mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 04:14:49 +08:00
scsi: qla2xxx: Make it explicit that ELS pass-through IOCBs use little endian
According to the firmware documentation the firmware expects all ELS pass-through IOCB parameters in little endian format. Make this explicit. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
0597fe601a
commit
9933c050fe
@ -761,13 +761,13 @@ struct els_entry_24xx {
|
||||
#define ECF_CLR_PASSTHRU_PEND BIT_12
|
||||
#define ECF_INCL_FRAME_HDR BIT_11
|
||||
|
||||
uint32_t rx_byte_count;
|
||||
uint32_t tx_byte_count;
|
||||
__le32 rx_byte_count;
|
||||
__le32 tx_byte_count;
|
||||
|
||||
__le64 tx_address __packed; /* Data segment 0 address. */
|
||||
uint32_t tx_len; /* Data segment 0 length. */
|
||||
__le32 tx_len; /* Data segment 0 length. */
|
||||
__le64 rx_address __packed; /* Data segment 1 address. */
|
||||
uint32_t rx_len; /* Data segment 1 length. */
|
||||
__le32 rx_len; /* Data segment 1 length. */
|
||||
};
|
||||
|
||||
struct els_sts_entry_24xx {
|
||||
|
@ -2704,12 +2704,12 @@ qla24xx_els_logo_iocb(srb_t *sp, struct els_entry_24xx *els_iocb)
|
||||
|
||||
if (elsio->u.els_logo.els_cmd == ELS_DCMD_PLOGI) {
|
||||
els_iocb->tx_byte_count = els_iocb->tx_len =
|
||||
sizeof(struct els_plogi_payload);
|
||||
cpu_to_le32(sizeof(struct els_plogi_payload));
|
||||
put_unaligned_le64(elsio->u.els_plogi.els_plogi_pyld_dma,
|
||||
&els_iocb->tx_address);
|
||||
els_iocb->rx_dsd_count = 1;
|
||||
els_iocb->rx_byte_count = els_iocb->rx_len =
|
||||
sizeof(struct els_plogi_payload);
|
||||
cpu_to_le32(sizeof(struct els_plogi_payload));
|
||||
put_unaligned_le64(elsio->u.els_plogi.els_resp_pyld_dma,
|
||||
&els_iocb->rx_address);
|
||||
|
||||
@ -2718,7 +2718,8 @@ qla24xx_els_logo_iocb(srb_t *sp, struct els_entry_24xx *els_iocb)
|
||||
ql_dump_buffer(ql_log_info, vha, 0x0109,
|
||||
(uint8_t *)els_iocb, 0x70);
|
||||
} else {
|
||||
els_iocb->tx_byte_count = sizeof(struct els_logo_payload);
|
||||
els_iocb->tx_byte_count =
|
||||
cpu_to_le32(sizeof(struct els_logo_payload));
|
||||
put_unaligned_le64(elsio->u.els_logo.els_logo_pyld_dma,
|
||||
&els_iocb->tx_address);
|
||||
els_iocb->tx_len = cpu_to_le32(sizeof(struct els_logo_payload));
|
||||
|
Loading…
Reference in New Issue
Block a user