Re: IO transfer limits

2007-01-11 Thread James Bottomley
On Thu, 2007-01-11 at 11:48 -0800, john clyne wrote: > So what's the best course of action for increasing the 512kb IO transfer size > limit, changing SCSI_MAX_PHYS_SEGMENTS (currently 128 and apparently can be > set no greater than 256), or increasing the page size? Or is there another > option.

Re: IO transfer limits

2007-01-11 Thread Stefan Richter
Douglas Gilbert wrote: > There are cheap external boxes out there that have 1394, > USB and (e)SATA interfaces. I wonder what would happen > if one tried to use two interfaces connected to different > machines at the same time :-) AFAIK these are all based on the OXUF924 series of bridge chips. Th

Bug: 2.6.20 scsi/block device/elevator recursion loop

2007-01-11 Thread Linas Vepstas
Hi, On Thu, Jan 11, 2007 at 04:22:52PM -0500, [EMAIL PROTECTED] wrote: > This patch is present in upstream and is also present > in 2.6.20. So this is a new issue. What was the patch last time around? It seems I'm seeing this more often than expected. The first time, the system spewed the soft

Re: lpfc PCIe error recovey

2007-01-11 Thread Linas Vepstas
On Wed, Jan 10, 2007 at 04:59:39PM -0600, linas wrote: > > > However, on a Power4 architecture there are errors reported > > in upper layer (we discussed this in one of earlier emails) followed > > by SCSI errors. > > I'm trying to investigate now. I found two distinct power4 bugs. I posted a p

[PATCH 21/21] libsas: Start I_T recovery if ABORT TASK fails

2007-01-11 Thread Darrick J. Wong
The EH should fall into I_T recovery (and potentially stronger remedies) if ABORT TASK fails. Signed-off-by: Alexis Bruemmer <[EMAIL PROTECTED]> --- drivers/scsi/libsas/sas_scsi_host.c | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/libsas/sas

[PATCH 20/21] libsas: Add SAS_HA state flags to avoid queueing events while unloading

2007-01-11 Thread Darrick J. Wong
Track sas_ha_struct state so that we ignore events that come in while we're shutting things down. Signed-off-by: Malahal Naineni <[EMAIL PROTECTED]> --- drivers/scsi/libsas/sas_discover.c |2 +- drivers/scsi/libsas/sas_event.c|6 +++--- drivers/scsi/libsas/sas_init.c | 12

[PATCH 19/21] libsas: phy port lock needs irq spinlocks

2007-01-11 Thread Darrick J. Wong
Convert the phy port locks to use irq spinlocks. Signed-off-by: Darrick J. Wong <[EMAIL PROTECTED]> --- drivers/scsi/libsas/sas_port.c | 12 +++- drivers/scsi/libsas/sas_scsi_host.c |5 +++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/libsas/

[PATCH 18/21] aic94xx: Scan SAS devices asynchronously

2007-01-11 Thread Darrick J. Wong
Add the necessary hooks to the aic94xx driver to support the asynchronous SCSI device scan infrastructure. Signed-off-by: Darrick J. Wong <[EMAIL PROTECTED]> Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]> --- drivers/scsi/aic94xx/aic94xx_init.c | 41 --- 1 f

[PATCH 17/21] libsas: sysfs phy control attributes should not be S_IWUGO

2007-01-11 Thread Darrick J. Wong
Allowing the phy reset controls to be world-triggerable does not seem like a terribly good idea because SAS devices can be disrupted (and ATA devices are really disrupted) by a phy reset. By default only root should be able to do things like that. Signed-off-by: Darrick J. Wong <[EMAIL PROTECTED

[PATCH 15/21] aic94xx: Fix DDB and SCB initialization

2007-01-11 Thread Darrick J. Wong
Ed Chim of Adaptec informs us that the DDB registers need to be zeroed at initialization time and that some SCB initializations need to happen even if we don't use the SCB. Signed-off-by: Darrick J. Wong <[EMAIL PROTECTED]> --- drivers/scsi/aic94xx/aic94xx_init.c |2 +- drivers/scsi/aic94xx

[PATCH 16/21] aic94xx: Lock DDB read/write accesses

2007-01-11 Thread Darrick J. Wong
Extend the use of the DDB lock to include all DDB accesses, because DDB updates now occur from multiple threads. This fixes the SMP timeout problems that we were occasionally seeing with a x260, because the controller got confused when the DDBs got corrupted. Signed-off-by: Darrick J. Wong <[EMA

[PATCH 14/21] aic94xx: Match request_firmware with release_firmware

2007-01-11 Thread Darrick J. Wong
The vmalloc() blob holding the sequencer firmware wasn't being released at module unload time, which resulted in a memory leak. Signed-off-by: Alexis Bruemmer <[EMAIL PROTECTED]> Acked-by: Darrick J. Wong <[EMAIL PROTECTED]> --- drivers/scsi/aic94xx/aic94xx_init.c |1 + drivers/scsi/aic94xx

[PATCH 13/21] aic94xx: Remove workqueue code from REQ_TASK_ABORT/REQ_DEVICE_RESET code

2007-01-11 Thread Darrick J. Wong
Now that task aborts and device port resets are done by the EH, we can remove all the code that set up workqueues and such and simply call sas_task_abort and let libsas figure things out. --- drivers/scsi/aic94xx/aic94xx_scb.c | 122 +++- 1 files changed, 66 inse

[PATCH 11/21] libsas: Enable the EH strategy handler to reset a phy after a command

2007-01-11 Thread Darrick J. Wong
When a SAS LLDD needs to request a device port reset, it needs to have all commands aborted before it can reset the port. Since commands are put on the EH's list in the order that they were queued, the LLDD can set a "need reset" flag in the last task to be aborted so that the EH can reset the po

[PATCH 12/21] libsas: Delay issuing ABORT TASK TMF until the error handler

2007-01-11 Thread Darrick J. Wong
sas_task_abort() should simply abort the upper-level SCSI command and wait until the error handler to send the actual ABORT TASK command. By deferring things to the EH we simplify the concurrency coordination and eliminate some race conditions. Note that sas_task_abort has a few hooks to handle

[PATCH 10/21] libsas: Remove SAS_TASK_INITIATOR_ABORTED flag

2007-01-11 Thread Darrick J. Wong
This flag is no longer necessary because we push tasks to be aborted into the EH as soon as we possibly can, and let the SCSI EH code take care of the coordination for which this flag was used. Signed-off-by: Darrick J. Wong <[EMAIL PROTECTED]> --- drivers/scsi/libsas/sas_scsi_host.c | 17 ---

[PATCH 09/21] aic94xx: Don't eat TMF_QUERY_TASK results

2007-01-11 Thread Darrick J. Wong
In this driver, TMF_QUERY_TASK translates to QUERY_SSP_TASK. The sequencer, it seems, is perfectly happy sending us a SSP response, which this function promptly "converts" into TMF_RESP_FUNC_FAILED. This leads to the SAS EH making bad decisions based on bad data, so we should not perform the con

[PATCH 07/21] aic94xx: Set lldd_max_execute_num in sas_ha

2007-01-11 Thread Darrick J. Wong
The aic94xx module has a parameter that looks like it should set lldd_max_execute_num in the sas_ha, but it never sets this value. Either we should set it or remove the parameter. This allows us to enable task collector mode for this driver, though it is still off by default. Signed-off-by: Dar

[PATCH 08/21] libsas: Use SCAN_WILD_CARD instead of ~0

2007-01-11 Thread Darrick J. Wong
Magic number cleanup. Signed-off-by: Darrick J. Wong <[EMAIL PROTECTED]> --- drivers/scsi/scsi_transport_sas.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 9e38c18..e57b02e 100644 --- a/dri

[PATCH 06/21] libsas: Destroy the task collector thread after releasing ports

2007-01-11 Thread Darrick J. Wong
If we use task collector mode, we can end up destroying the task collector thread before we release the ports, which is bad if a port release causes a disk I/O (such as cache flushing). Signed-off-by: Darrick J. Wong <[EMAIL PROTECTED]> --- drivers/scsi/libsas/sas_init.c |5 +++-- 1 files c

[PATCH 05/21] libsas: Reset timer on taskless scsi_cmnds in sas_scsi_timed_out

2007-01-11 Thread Darrick J. Wong
Every so often, a scsi_cmnd will time out, and the libsas timeout handler will discover that the scsi_cmnd does not have a sas_task attached to it. This can happen in two cases: (1) the scsi_cmnd actually made it through libsas to the HBA and is now going through scsi_done, or (2) the scsi_cmnd ha

[PATCH 04/21] libsas: Add a sysfs knob to enable/disable a phy

2007-01-11 Thread Darrick J. Wong
This patch lets a user arbitrarily enable or disable a phy via sysfs. Potential applications include shutting down a phy to replace one lane of wide port, and (more importantly) providing a method for the libata SATL to control the phy. Signed-off-by: Darrick J. Wong <[EMAIL PROTECTED]> --- dri

[PATCH 02/21] libsas: Clean up rphys/port dev list after a discovery error on an expander

2007-01-11 Thread Darrick J. Wong
sas_get_port_device assigns a rphy to a domain device in anticipation of finding a disk. When a discovery error occurs in sas_discover_{sata,sas,expander}*, however, we need to clean up that rphy and the port device list so that we don't GPF. In addition, we need to check the result of the secon

[PATCH 03/21] libsas: Don't give scsi_cmnds to the EH if they never made it to the SAS LLDD or have already returned

2007-01-11 Thread Darrick J. Wong
On a system with many SAS targets, it appears possible that a scsi_cmnd can time out without ever making it to the SAS LLDD or at the same time that a completion is occurring. In both of these cases, telling the LLDD to abort the sas_task makes no sense because the LLDD won't know about the sas_t

[PATCH 01/21] libsas: Clean up rphys/port dev list after a discovery error.

2007-01-11 Thread Darrick J. Wong
sas_get_port_device assigns a rphy to a domain device in anticipation of finding a disk. When a discovery error occurs in sas_discover_{sata,sas,expander}*, however, we need to clean up that rphy and the port device list so that we don't GPF. In addition, we need to check the result of the secon

[PATCH 00/21] Roll-up of libsas and aic94xx patches

2007-01-11 Thread Darrick J. Wong
Hi all, This is a roll-up of all of my uncommitted patches against libsas and aic94xx to date. There is only one new patch since last month, which makes aic94xx work with the async SCSI scanning code. [excerpt from last month's message] It has been a while since I posted the last batch of patch

[PATCH 00/21] Roll-up of libsas and aic94xx patches

2007-01-11 Thread Darrick J. Wong
Hi all, This is a roll-up of all of my uncommitted patches against libsas and aic94xx to date. There is only one new patch since last month, which makes aic94xx work with the async SCSI scanning code. [excerpt from last month's message] It has been a while since I posted the last batch of patch

Re: IO transfer limits

2007-01-11 Thread Douglas Gilbert
Stefan Richter wrote: > Douglas Gilbert wrote: >> john clyne wrote: >>> What do the different hostX in /sys/class/scsi_host corespond to? There are >>> seven hostX directories, 5 with sg_tablesize set to 128 and two set to 255. >> A Linux "host" is a SCSI initiator port (e.g. FC) or a >> SCSI initi

[PATCH] mptbase: Reset ioc initiator after PCI resume

2007-01-11 Thread Darrick J. Wong
It appears that the LSI SAS 1064E chip needs to be reset after a suspend/resume cycle before the driver attempts further communications with the chip. This patch gets rid of these error messages: mptbase: ioc0: ERROR - Invalid IOC facts reply, msgLength=0 offsetof=6! after a system wakes up from

Re: no utility / method to show association between host bus adapter and non-sg BLOCK devices

2007-01-11 Thread Douglas Gilbert
Thayne Harmon wrote: > Gentlemen, > > hwinfo, lshal, sysfs do not show the relationship for non-sg BLOCK devices > with there > associated Host Bus Adapter. All devices (i.e. logical units) have a 4 element tuple associated with them and the first element is the host number. A HBA contains one

Re: Adaptect 9405w: What is the best solution?

2007-01-11 Thread Darrick J. Wong
Tarjei Huse wrote: > Ok, I haven't tested a git tree yet, but what you're saying is that I > should download just this git tree and use it, right? I suppose you could do that with some patch massaging, though at the moment the patches are based off 2.6.20-rc4 + scsi-misc + scsi-rc-fixes + aic94xx

Re: Adaptect 9405w: What is the best solution?

2007-01-11 Thread Tarjei Huse
Hi, Darrick J. Wong wrote: [cc'ing a few contacts at adaptec] Douglas Gilbert wrote: Tarjei Huse wrote: Hi, I'm working on getting Linux to use my SATA drives on an IBM x306 running a HostRaid controller that uses the adaptech 9405w chipset. c) In the thread Darrick Wong r

Re: IO transfer limits

2007-01-11 Thread john clyne
So what's the best course of action for increasing the 512kb IO transfer size limit, changing SCSI_MAX_PHYS_SEGMENTS (currently 128 and apparently can be set no greater than 256), or increasing the page size? Or is there another option. thanks - jc James Bottomley wrote: > > On Wed, 2007-01-10

no utility / method to show association between host bus adapter and non-sg BLOCK devices

2007-01-11 Thread Thayne Harmon
Gentlemen, hwinfo, lshal, sysfs do not show the relationship for non-sg BLOCK devices with there associated Host Bus Adapter. Do you know of a utility or method that can show this? Example is the HP/Compaq CCISS block driver. The HBA and devices are listed, but no association is given or can

Re: Adaptect 9405w: What is the best solution?

2007-01-11 Thread Darrick J. Wong
[cc'ing a few contacts at adaptec] Douglas Gilbert wrote: > Tarjei Huse wrote: >> Hi, I'm working on getting Linux to use my SATA drives on an IBM x306 >> running a HostRaid controller that uses the adaptech 9405w chipset. >> c) In the thread Darrick Wong refers to another branch[1] that contains

Re: IO transfer limits

2007-01-11 Thread James Bottomley
On Wed, 2007-01-10 at 15:07 -0800, john clyne wrote: > So given that the HBA max_sectors_kb looks sufficiently large, my > interpretation of your article is the next place I need to look is at > ajusting SCSI_MAX_PHYS_SEGMENTS. Sounds like i can only increase this to > 256. Does that than give me a

Re: [RFC PATCH 3/3] blk_end_request: caller change

2007-01-11 Thread Kiyoshi Ueda
Hi Jens, On Thu, 11 Jan 2007 09:34:31 +0100, Jens Axboe <[EMAIL PROTECTED]> wrote: > > +static int cdrom_newpc_intr_dma_callback(void *arg) > > +{ > > + void **argv = (void **)arg; > > + struct request *rq = (struct request *)*argv++; > > + ide_drive_t *drive = (ide_drive_t *)argv++; > > +

Re: IO transfer limits

2007-01-11 Thread Stefan Richter
Douglas Gilbert wrote: > john clyne wrote: >> What do the different hostX in /sys/class/scsi_host corespond to? There are >> seven hostX directories, 5 with sg_tablesize set to 128 and two set to 255. > > A Linux "host" is a SCSI initiator port (e.g. FC) or a > SCSI initiator device (e.g. SAS). An

Re: Adaptect 9405w: What is the best solution?

2007-01-11 Thread Douglas Gilbert
Tarjei Huse wrote: > Hi, I'm working on getting Linux to use my SATA drives on an IBM x306 > running a HostRaid controller that uses the adaptech 9405w chipset. > > I found this thread on the list: > http://thread.gmane.org/gmane.linux.scsi/29040/focus=29040 Basically Luben Tuikov developed the o

RE: lpfc PCIe error recoveyr

2007-01-11 Thread Bino . Sebastian
I looks like there is a recursion in the stack trace. scsi_request_fn is called recursively. -bino -Original Message- From: Linas Vepstas [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 10, 2007 6:00 PM To: Sebastian, Bino Cc: Smart, James; [EMAIL PROTECTED]; Barry, Laurie; [EMAIL PROT

Adaptect 9405w: What is the best solution?

2007-01-11 Thread Tarjei Huse
Hi, I'm working on getting Linux to use my SATA drives on an IBM x306 running a HostRaid controller that uses the adaptech 9405w chipset. I found this thread on the list: http://thread.gmane.org/gmane.linux.scsi/29040/focus=29040 What I'm wondering about is: a) Where can I get the patches that

no disk drive detected at boot time

2007-01-11 Thread Jean-Max Reymond
hi, The computer is an DELL 1600SC with SATA RAID. At boot time, no disk are detected. I have tried with Ubuntu Edgy and Fedora Core 6 and I have the same troubles. Fedora Core 2 is running on the computer. it seems that Dell CERC ATA100/4ch is not supported by any driver. see http://www.mail-arc

Re: [RFC PATCH 3/3] blk_end_request: caller change

2007-01-11 Thread Jens Axboe
On Wed, Jan 10 2007, Kiyoshi Ueda wrote: > +static int end_request_callback(void *arg) > +{ > + struct request *req = (struct request *)arg; > + > + add_disk_randomness(req->rq_disk); > + blkdev_dequeue_request(req); > + > + return 0; > +} This is bad, don't pass void * around. >