Skip to content

Commit

Permalink
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "One iscsi driver fix and one core fix.

  The core fix is an important one because a retry efficiency update is
  now causing some USB devices to get the wrong size on discovery (it
  upset their retry logic for READ_CAPACITY_16)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: iscsi: Fix redundant response for ISCSI_UEVENT_GET_HOST_STATS request
  scsi: core: Fix command pass through retry regression
  • Loading branch information
torvalds committed Jan 14, 2025
2 parents 79a1d39 + 63ca022 commit c3812b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ static int scsi_check_passthrough(struct scsi_cmnd *scmd,
struct scsi_sense_hdr sshdr;
enum sam_status status;

if (!scmd->result)
return 0;

if (!failures)
return 0;

Expand Down
4 changes: 3 additions & 1 deletion drivers/scsi/scsi_transport_iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -4104,7 +4104,7 @@ iscsi_if_rx(struct sk_buff *skb)
}
do {
/*
* special case for GET_STATS:
* special case for GET_STATS, GET_CHAP and GET_HOST_STATS:
* on success - sending reply and stats from
* inside of if_recv_msg(),
* on error - fall through.
Expand All @@ -4113,6 +4113,8 @@ iscsi_if_rx(struct sk_buff *skb)
break;
if (ev->type == ISCSI_UEVENT_GET_CHAP && !err)
break;
if (ev->type == ISCSI_UEVENT_GET_HOST_STATS && !err)
break;
err = iscsi_if_send_reply(portid, nlh->nlmsg_type,
ev, sizeof(*ev));
if (err == -EAGAIN && --retries < 0) {
Expand Down

0 comments on commit c3812b1

Please sign in to comment.