SCSI fixes on 20241011
four small fixes, three in drivers and one in the FC transport class to add idempotence to state setting. Signed-off-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCZwnsDSYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishZYjAP9QKRk5 1i/g9TyqFCurbt+R4BJGiNg+89WUnLxgNbThsgD9FqmXRsm2mGok02lQS4bz5Asv OkNVO2se/q6IlplijV8= =RCJc -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four small fixes, three in drivers and one in the FC transport class to add idempotence to state setting" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: scsi_transport_fc: Allow setting rport state to current state scsi: wd33c93: Don't use stale scsi_pointer value scsi: fnic: Move flush_work initialization out of if block scsi: ufs: Use pre-calculated offsets in ufshcd_init_lrb()
This commit is contained in:
commit
7234e2ea0e
@ -830,7 +830,6 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
spin_lock_init(&fnic->vlans_lock);
|
spin_lock_init(&fnic->vlans_lock);
|
||||||
INIT_WORK(&fnic->fip_frame_work, fnic_handle_fip_frame);
|
INIT_WORK(&fnic->fip_frame_work, fnic_handle_fip_frame);
|
||||||
INIT_WORK(&fnic->event_work, fnic_handle_event);
|
INIT_WORK(&fnic->event_work, fnic_handle_event);
|
||||||
INIT_WORK(&fnic->flush_work, fnic_flush_tx);
|
|
||||||
skb_queue_head_init(&fnic->fip_frame_queue);
|
skb_queue_head_init(&fnic->fip_frame_queue);
|
||||||
INIT_LIST_HEAD(&fnic->evlist);
|
INIT_LIST_HEAD(&fnic->evlist);
|
||||||
INIT_LIST_HEAD(&fnic->vlans);
|
INIT_LIST_HEAD(&fnic->vlans);
|
||||||
@ -948,6 +947,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
|
|
||||||
INIT_WORK(&fnic->link_work, fnic_handle_link);
|
INIT_WORK(&fnic->link_work, fnic_handle_link);
|
||||||
INIT_WORK(&fnic->frame_work, fnic_handle_frame);
|
INIT_WORK(&fnic->frame_work, fnic_handle_frame);
|
||||||
|
INIT_WORK(&fnic->flush_work, fnic_flush_tx);
|
||||||
skb_queue_head_init(&fnic->frame_queue);
|
skb_queue_head_init(&fnic->frame_queue);
|
||||||
skb_queue_head_init(&fnic->tx_queue);
|
skb_queue_head_init(&fnic->tx_queue);
|
||||||
|
|
||||||
|
@ -1250,7 +1250,7 @@ static ssize_t fc_rport_set_marginal_state(struct device *dev,
|
|||||||
*/
|
*/
|
||||||
if (rport->port_state == FC_PORTSTATE_ONLINE)
|
if (rport->port_state == FC_PORTSTATE_ONLINE)
|
||||||
rport->port_state = port_state;
|
rport->port_state = port_state;
|
||||||
else
|
else if (port_state != rport->port_state)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
} else if (port_state == FC_PORTSTATE_ONLINE) {
|
} else if (port_state == FC_PORTSTATE_ONLINE) {
|
||||||
/*
|
/*
|
||||||
@ -1260,7 +1260,7 @@ static ssize_t fc_rport_set_marginal_state(struct device *dev,
|
|||||||
*/
|
*/
|
||||||
if (rport->port_state == FC_PORTSTATE_MARGINAL)
|
if (rport->port_state == FC_PORTSTATE_MARGINAL)
|
||||||
rport->port_state = port_state;
|
rport->port_state = port_state;
|
||||||
else
|
else if (port_state != rport->port_state)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
} else
|
} else
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -831,7 +831,7 @@ wd33c93_intr(struct Scsi_Host *instance)
|
|||||||
/* construct an IDENTIFY message with correct disconnect bit */
|
/* construct an IDENTIFY message with correct disconnect bit */
|
||||||
|
|
||||||
hostdata->outgoing_msg[0] = IDENTIFY(0, cmd->device->lun);
|
hostdata->outgoing_msg[0] = IDENTIFY(0, cmd->device->lun);
|
||||||
if (scsi_pointer->phase)
|
if (WD33C93_scsi_pointer(cmd)->phase)
|
||||||
hostdata->outgoing_msg[0] |= 0x40;
|
hostdata->outgoing_msg[0] |= 0x40;
|
||||||
|
|
||||||
if (hostdata->sync_stat[cmd->device->id] == SS_FIRST) {
|
if (hostdata->sync_stat[cmd->device->id] == SS_FIRST) {
|
||||||
|
@ -2933,9 +2933,8 @@ static void ufshcd_init_lrb(struct ufs_hba *hba, struct ufshcd_lrb *lrb, int i)
|
|||||||
struct utp_transfer_req_desc *utrdlp = hba->utrdl_base_addr;
|
struct utp_transfer_req_desc *utrdlp = hba->utrdl_base_addr;
|
||||||
dma_addr_t cmd_desc_element_addr = hba->ucdl_dma_addr +
|
dma_addr_t cmd_desc_element_addr = hba->ucdl_dma_addr +
|
||||||
i * ufshcd_get_ucd_size(hba);
|
i * ufshcd_get_ucd_size(hba);
|
||||||
u16 response_offset = offsetof(struct utp_transfer_cmd_desc,
|
u16 response_offset = le16_to_cpu(utrdlp[i].response_upiu_offset);
|
||||||
response_upiu);
|
u16 prdt_offset = le16_to_cpu(utrdlp[i].prd_table_offset);
|
||||||
u16 prdt_offset = offsetof(struct utp_transfer_cmd_desc, prd_table);
|
|
||||||
|
|
||||||
lrb->utr_descriptor_ptr = utrdlp + i;
|
lrb->utr_descriptor_ptr = utrdlp + i;
|
||||||
lrb->utrd_dma_addr = hba->utrdl_dma_addr +
|
lrb->utrd_dma_addr = hba->utrdl_dma_addr +
|
||||||
|
Loading…
Reference in New Issue
Block a user