Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-scsi@vger.kernel.org,
	"bugme-daemon@kernel-bugs.osdl.org"
	<bugme-daemon@kernel-bugs.osdl.org>,
	freelsjd@ornl.gov
Subject: Re: Fw: [Bugme-new] [Bug 5268] New: aic79xx scsi driver causing system to hang
Date: Sat, 17 Sep 2005 13:30:56 -0700	[thread overview]
Message-ID: <20050917133056.487394cf.akpm@osdl.org> (raw)
In-Reply-To: <1126904578.4631.2.camel@mulgrave>


(Add reporter and bugzilla to cc)

James Bottomley <James.Bottomley@SteelEye.com> wrote:
>
> On Fri, 2005-09-16 at 12:03 -0700, Andrew Morton wrote:
> > This one's a bit strange.
> > 
> > It's a post-2.6.12 regression.
> 
> Yes, strange to me too.  The changes that went in to aic79xx between
> 2.6.12 and 2.6.13 were tiny:
> 
>  aic79xx_osm.c |   18 +++++++++---------
>  aic79xx_osm.h |   17 -----------------
>  aic79xx_pci.c |    2 +-
>  3 files changed, 10 insertions(+), 27 deletions(-)
> 
> I've also attached them below, but I think they were
> 
> 1) #if -> #ifdef changes
> 2) removal of the duplicated ENDIAN macros
> 3) ahd_midlayer_entrypoint_lock/unlock -> ahd_lock/unlock
> 
> I can't see how anything in these could produce the shown behaviour.
> 
> James
> 
> diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
> --- a/drivers/scsi/aic7xxx/aic79xx_osm.c
> +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
> @@ -1505,23 +1505,23 @@ ahd_linux_dev_reset(Scsi_Cmnd *cmd)
>  	memset(recovery_cmd, 0, sizeof(struct scsi_cmnd));
>  	recovery_cmd->device = cmd->device;
>  	recovery_cmd->scsi_done = ahd_linux_dev_reset_complete;
> -#if AHD_DEBUG
> +#ifdef AHD_DEBUG
>  	if ((ahd_debug & AHD_SHOW_RECOVERY) != 0)
>  		printf("%s:%d:%d:%d: Device reset called for cmd %p\n",
>  		       ahd_name(ahd), cmd->device->channel, cmd->device->id,
>  		       cmd->device->lun, cmd);
>  #endif
> -	ahd_midlayer_entrypoint_lock(ahd, &s);
> +	ahd_lock(ahd, &s);
>  
>  	dev = ahd_linux_get_device(ahd, cmd->device->channel, cmd->device->id,
>  				   cmd->device->lun, /*alloc*/FALSE);
>  	if (dev == NULL) {
> -		ahd_midlayer_entrypoint_unlock(ahd, &s);
> +		ahd_unlock(ahd, &s);
>  		kfree(recovery_cmd);
>  		return (FAILED);
>  	}
>  	if ((scb = ahd_get_scb(ahd, AHD_NEVER_COL_IDX)) == NULL) {
> -		ahd_midlayer_entrypoint_unlock(ahd, &s);
> +		ahd_unlock(ahd, &s);
>  		kfree(recovery_cmd);
>  		return (FAILED);
>  	}
> @@ -1553,7 +1553,7 @@ ahd_linux_dev_reset(Scsi_Cmnd *cmd)
>  	ahd_queue_scb(ahd, scb);
>  
>  	scb->platform_data->flags |= AHD_SCB_UP_EH_SEM;
> -	spin_unlock_irq(&ahd->platform_data->spin_lock);
> +	ahd_unlock(ahd, &s);
>  	init_timer(&timer);
>  	timer.data = (u_long)scb;
>  	timer.expires = jiffies + (5 * HZ);
> @@ -1567,10 +1567,10 @@ ahd_linux_dev_reset(Scsi_Cmnd *cmd)
>  		printf("Timer Expired\n");
>  		retval = FAILED;
>  	}
> -	spin_lock_irq(&ahd->platform_data->spin_lock);
> +	ahd_lock(ahd, &s);
>  	ahd_schedule_runq(ahd);
>  	ahd_linux_run_complete_queue(ahd);
> -	ahd_midlayer_entrypoint_unlock(ahd, &s);
> +	ahd_unlock(ahd, &s);
>  	printf("%s: Device reset returning 0x%x\n", ahd_name(ahd), retval);
>  	return (retval);
>  }
> @@ -1591,11 +1591,11 @@ ahd_linux_bus_reset(Scsi_Cmnd *cmd)
>  		printf("%s: Bus reset called for cmd %p\n",
>  		       ahd_name(ahd), cmd);
>  #endif
> -	ahd_midlayer_entrypoint_lock(ahd, &s);
> +	ahd_lock(ahd, &s);
>  	found = ahd_reset_channel(ahd, cmd->device->channel + 'A',
>  				  /*initiate reset*/TRUE);
>  	ahd_linux_run_complete_queue(ahd);
> -	ahd_midlayer_entrypoint_unlock(ahd, &s);
> +	ahd_unlock(ahd, &s);
>  
>  	if (bootverbose)
>  		printf("%s: SCSI bus reset delivered. "
> diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h
> --- a/drivers/scsi/aic7xxx/aic79xx_osm.h
> +++ b/drivers/scsi/aic7xxx/aic79xx_osm.h
> @@ -112,23 +112,6 @@ typedef Scsi_Cmnd      *ahd_io_ctx_t;
>  #define ahd_le32toh(x)	le32_to_cpu(x)
>  #define ahd_le64toh(x)	le64_to_cpu(x)
>  
> -#ifndef LITTLE_ENDIAN
> -#define LITTLE_ENDIAN 1234
> -#endif
> -
> -#ifndef BIG_ENDIAN
> -#define BIG_ENDIAN 4321
> -#endif
> -
> -#ifndef BYTE_ORDER
> -#if defined(__BIG_ENDIAN)
> -#define BYTE_ORDER BIG_ENDIAN
> -#endif
> -#if defined(__LITTLE_ENDIAN)
> -#define BYTE_ORDER LITTLE_ENDIAN
> -#endif
> -#endif /* BYTE_ORDER */
> -
>  /************************* Configuration Data *********************************/
>  extern uint32_t aic79xx_allow_memio;
>  extern int aic79xx_detect_complete;
> diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c
> --- a/drivers/scsi/aic7xxx/aic79xx_pci.c
> +++ b/drivers/scsi/aic7xxx/aic79xx_pci.c
> @@ -582,7 +582,7 @@ ahd_check_extport(struct ahd_softc *ahd)
>  		}
>  	}
>  
> -#if AHD_DEBUG
> +#ifdef AHD_DEBUG
>  	if (have_seeprom != 0
>  	 && (ahd_debug & AHD_DUMP_SEEPROM) != 0) {
>  		uint16_t *sc_data;

      reply	other threads:[~2005-09-17 20:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-16 19:03 Fw: [Bugme-new] [Bug 5268] New: aic79xx scsi driver causing system to hang Andrew Morton
2005-09-16 21:02 ` James Bottomley
2005-09-17 20:30   ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050917133056.487394cf.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=bugme-daemon@kernel-bugs.osdl.org \
    --cc=freelsjd@ornl.gov \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox