提交 0dfa1c5d 编写于 作者: H Hannes Reinecke 提交者: Nicholas Bellinger

target: Export SPC inquiry emulation

Some target drivers might need to access the inquiry data
directly, without sending out the actual command.
So export these functions.
Signed-off-by: NHannes Reinecke <hare@suse.de>
Cc: Nicholas Bellinger <nab@risingtidesystems.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 836dc9e3
...@@ -66,8 +66,8 @@ static void spc_fill_alua_data(struct se_port *port, unsigned char *buf) ...@@ -66,8 +66,8 @@ static void spc_fill_alua_data(struct se_port *port, unsigned char *buf)
spin_unlock(&tg_pt_gp_mem->tg_pt_gp_mem_lock); spin_unlock(&tg_pt_gp_mem->tg_pt_gp_mem_lock);
} }
static sense_reason_t sense_reason_t
spc_emulate_inquiry_std(struct se_cmd *cmd, char *buf) spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf)
{ {
struct se_lun *lun = cmd->se_lun; struct se_lun *lun = cmd->se_lun;
struct se_device *dev = cmd->se_dev; struct se_device *dev = cmd->se_dev;
...@@ -104,6 +104,7 @@ spc_emulate_inquiry_std(struct se_cmd *cmd, char *buf) ...@@ -104,6 +104,7 @@ spc_emulate_inquiry_std(struct se_cmd *cmd, char *buf)
return 0; return 0;
} }
EXPORT_SYMBOL(spc_emulate_inquiry_std);
/* unit serial number */ /* unit serial number */
static sense_reason_t static sense_reason_t
...@@ -160,7 +161,7 @@ static void spc_parse_naa_6h_vendor_specific(struct se_device *dev, ...@@ -160,7 +161,7 @@ static void spc_parse_naa_6h_vendor_specific(struct se_device *dev,
* Device identification VPD, for a complete list of * Device identification VPD, for a complete list of
* DESIGNATOR TYPEs see spc4r17 Table 459. * DESIGNATOR TYPEs see spc4r17 Table 459.
*/ */
static sense_reason_t sense_reason_t
spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf) spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf)
{ {
struct se_device *dev = cmd->se_dev; struct se_device *dev = cmd->se_dev;
...@@ -404,6 +405,7 @@ spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf) ...@@ -404,6 +405,7 @@ spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf)
buf[3] = (len & 0xff); /* Page Length for VPD 0x83 */ buf[3] = (len & 0xff); /* Page Length for VPD 0x83 */
return 0; return 0;
} }
EXPORT_SYMBOL(spc_emulate_evpd_83);
/* Extended INQUIRY Data VPD Page */ /* Extended INQUIRY Data VPD Page */
static sense_reason_t static sense_reason_t
......
...@@ -53,6 +53,8 @@ void target_complete_cmd(struct se_cmd *, u8); ...@@ -53,6 +53,8 @@ void target_complete_cmd(struct se_cmd *, u8);
sense_reason_t spc_parse_cdb(struct se_cmd *cmd, unsigned int *size); sense_reason_t spc_parse_cdb(struct se_cmd *cmd, unsigned int *size);
sense_reason_t spc_emulate_report_luns(struct se_cmd *cmd); sense_reason_t spc_emulate_report_luns(struct se_cmd *cmd);
sector_t spc_get_write_same_sectors(struct se_cmd *cmd); sector_t spc_get_write_same_sectors(struct se_cmd *cmd);
sense_reason_t spc_emulate_inquiry_std(struct se_cmd *, unsigned char *);
sense_reason_t spc_emulate_evpd_83(struct se_cmd *, unsigned char *);
sense_reason_t sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops); sense_reason_t sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops);
u32 sbc_get_device_rev(struct se_device *dev); u32 sbc_get_device_rev(struct se_device *dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册