Re: [PATCH 02/10] scsi: Use Scsi_Host and channel number as argument for eh_bus_reset_handler()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/25/23 15:33, Benjamin Block wrote:
On Mon, Oct 23, 2023 at 11:28:29AM +0200, Hannes Reinecke wrote:
diff --git a/Documentation/scsi/scsi_mid_low_api.rst b/Documentation/scsi/scsi_mid_low_api.rst
index 96983bb1cc45..43083efc554b 100644
--- a/Documentation/scsi/scsi_mid_low_api.rst
+++ b/Documentation/scsi/scsi_mid_low_api.rst
@@ -741,7 +741,8 @@ Details::
/**
      *      eh_bus_reset_handler - issue SCSI bus reset
-    *      @scp: SCSI bus that contains this device should be reset
+    *      @host: SCSI Host that contains the channel which should be reset
+    *      @channel: channel to be reset
      *
      *      Returns SUCCESS if command aborted else FAILED

Same as in Patch 1. Although I don't know how relevant FAST_IO_FAIL is for bus
reset, we don't implement that for zFCP.

I'd rather delegate that to the later patch where I update scsi_error to factor in FAST_IO_FAIL for ioctl reset.

      *
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 77c91a405d20..ee8bb7985d09 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -863,21 +863,21 @@ ahd_linux_dev_reset(struct scsi_cmnd *cmd)
   * Reset the SCSI bus.
   */
  static int
-ahd_linux_bus_reset(struct scsi_cmnd *cmd)
+ahd_linux_bus_reset(struct Scsi_Host *shost, unsigned int channel)
  {
  	struct ahd_softc *ahd;
  	int    found;
  	unsigned long flags;
- ahd = *(struct ahd_softc **)cmd->device->host->hostdata;
+	ahd = *(struct ahd_softc **)shost->hostdata;

Not `shost_priv(shost)`? The pointer casts end up at `struct ahd_softc *`, so
`void *` as return type should be fine.

Ah, no. The adaptec driver is storing the _pointer_ to 'ahd_softc' in hostdata[0]. So shost_priv() won't work here. Or, rather, not without an additional cast, but then we might as well keep it for now.

Cheers,

Hannes
--
Dr. Hannes Reinecke                Kernel Storage Architect
hare@xxxxxxx                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux