Re: [PATCH] dc395x: Fix support for highmem

2005-03-15 Thread Jens Axboe
On Thu, Mar 03 2005, Linux Kernel Mailing List wrote:
> ChangeSet 1.1982.29.77, 2005/03/03 10:41:40+02:00, [EMAIL PROTECTED]
> 
>   [PATCH] dc395x: Fix support for highmem
>   
>   From: Guennadi Liakhovetski <[EMAIL PROTECTED]>
>   
>   Removes the page_to_virt and maps sg lists dynamically.
>   This makes the driver work with highmem pages.
>   
>   Signed-off-by: Guennadi Liakhovetski <[EMAIL PROTECTED]>
>   Signed-off-by: Jamie Lenehan <[EMAIL PROTECTED]>
>   Signed-off-by: James Bottomley <[EMAIL PROTECTED]>

Guys, who reviewed this? It looks completely bogus, using kmap() for tha
entire sg list is just wrong and can deadlock easily. The proper way is
of course to skip the virtual address requirement and dma map the sg
array properly.

>  dc395x.c |   48 +++-
>  1 files changed, 35 insertions(+), 13 deletions(-)
> 
> 
> diff -Nru a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
> --- a/drivers/scsi/dc395x.c   2005-03-15 18:09:50 -08:00
> +++ b/drivers/scsi/dc395x.c   2005-03-15 18:09:50 -08:00
> @@ -182,7 +182,7 @@
>   * cross a page boundy.
>   */
>  #define SEGMENTX_LEN (sizeof(struct SGentry)*DC395x_MAX_SG_LISTENTRY)
> -
> +#define VIRTX_LEN(sizeof(void *) * DC395x_MAX_SG_LISTENTRY)
>  
>  struct SGentry {
>   u32 address;/* bus! address */
> @@ -234,6 +234,7 @@
>   u8 sg_count;/* No of HW sg entries for this request 
> */
>   u8 sg_index;/* Index of HW sg entry for this 
> request */
>   u32 total_xfer_length;  /* Total number of bytes remaining to 
> be transfered */
> + void **virt_map;
>   unsigned char *virt_addr;   /* Virtual address of current transfer 
> position */
>  
>   /*
> @@ -1020,14 +1021,14 @@
>   reqlen, cmd->request_buffer, cmd->use_sg,
>   srb->sg_count);
>  
> - srb->virt_addr = page_address(sl->page);
>   for (i = 0; i < srb->sg_count; i++) {
> - u32 busaddr = (u32)sg_dma_address(&sl[i]);
> - u32 seglen = (u32)sl[i].length;
> - sgp[i].address = busaddr;
> + u32 seglen = (u32)sg_dma_len(sl + i);
> + sgp[i].address = (u32)sg_dma_address(sl + i);
>   sgp[i].length = seglen;
>   srb->total_xfer_length += seglen;
> + srb->virt_map[i] = kmap(sl[i].page);
>   }
> + srb->virt_addr = srb->virt_map[0];
>   sgp += srb->sg_count - 1;
>  
>   /*
> @@ -1964,6 +1965,7 @@
>   int segment = cmd->use_sg;
>   u32 xferred = srb->total_xfer_length - left; /* bytes transfered */
>   struct SGentry *psge = srb->segment_x + srb->sg_index;
> + void **virt = srb->virt_map;
>  
>   dprintkdbg(DBG_0,
>   "sg_update_list: Transfered %i of %i bytes, %i remain\n",
> @@ -2003,16 +2005,16 @@
>  
>   /* We have to walk the scatterlist to find it */
>   sg = (struct scatterlist *)cmd->request_buffer;
> + idx = 0;
>   while (segment--) {
>   unsigned long mask =
>   ~((unsigned long)sg->length - 1) & PAGE_MASK;
>   if ((sg_dma_address(sg) & mask) == (psge->address & mask)) {
> - srb->virt_addr = (page_address(sg->page)
> -+ psge->address -
> -(psge->address & PAGE_MASK));
> + srb->virt_addr = virt[idx] + (psge->address & 
> ~PAGE_MASK);
>   return;
>   }
>   ++sg;
> + ++idx;
>   }
>  
>   dprintkl(KERN_ERR, "sg_update_list: sg_to_virt failed\n");
> @@ -2138,7 +2140,7 @@
>   DC395x_read32(acb, TRM_S1040_DMA_CXCNT));
>   }
>   /*
> -  * calculate all the residue data that not yet tranfered
> +  * calculate all the residue data that not yet transfered
>* SCSI transfer counter + left in SCSI FIFO data
>*
>* .TRM_S1040_SCSI_COUNTER (24bits)
> @@ -3256,6 +3258,7 @@
>   struct scsi_cmnd *cmd = srb->cmd;
>   enum dma_data_direction dir = cmd->sc_data_direction;
>   if (cmd->use_sg && dir != PCI_DMA_NONE) {
> + int i;
>   /* unmap DC395x SG list */
>   dprintkdbg(DBG_SG, "pci_unmap_srb: list=%08x(%05x)\n",
>   srb->sg_bus_addr, SEGMENTX_LEN);
> @@ -3265,6 +3268,8 @@
>   dprintkdbg(DBG_SG, "pci_unmap_srb: segs=%i buffer=%p\n",
>   cmd->use_sg, cmd->request_buffer);
>   /* unmap the sg segments */
> + for (i = 0; i < srb->sg_count; i++)
> + kunmap(virt_to_page(srb->virt_map[i]));
>   pci_unmap_sg(acb->dev,
>

[BK PATCH] SCSI updates for 2.6.11

2005-03-15 Thread James Bottomley
This is my current tranch of patches that were waiting the transition
from -rc to released (sorry it's late ... I've been on holiday).

The patch is available here:

bk://linux-scsi.bkbits.net/scsi-for-linus-2.6

The short log is:

Adrian Bunk:
  o SCSI NCR_D700.c: make some code static
  o SCSI sim710.c: make some code static

Alan Stern:
  o Add a NOREPORTLUN blacklist flag
  o Retry supposedly "unrecoverable" hardware errors

Andi Kleen:
  o Fix selection of command serial numbers and pids
  o Add compat_ioctl to mptctl
  o Convert megaraid2 to compat_ioctl
  o Add compat_ioctl to SG
  o Convert aacraid to compat_ioctl
  o Add compat_ioctl to osst
  o Add comment for compat_ioctl to SR
  o Add compat_ioctl to st
  o Add compat_ioctl to SD

Andrew Morton:
  o st msleep warning fix

Andrew Vasquez:
  o target code updates to support scanned targets

Brian King:
  o ipr: Handle new RAID 6 errors
  o ipr: Bump driver version to 2.0.13
  o ipr: Send uevent change notifications
  o ipr: Sparse fixes
  o ipr: Use bitwise types
  o ipr: Remove tcq_active flag from resource entry
  o ipr: Remove resource qdepth field
  o ipr: Remove tcq_enable device attribute
  o ipr: Use change queue type API
  o ipr: Fast failure module options
  o ipr: Support dynamic IDs
  o ipr: Setup max_sectors based on device type
  o ipr: Device remove cleanup
  o ipr: New adapter support
  o ipr: PCI ID table update
  o PCI: update ipr PCI ids

Christoph Hellwig:
  o mark qlogicisp broken
  o mark eata_pio broken
  o qla1280: update changelog
  o qla1280: use pci_map_single
  o qla1280: remove qla1280_proc_info
  o drop some attibutes from the FC transport class

Dave Jones:
  o blacklist microtek scanmaker III

Eric Moore:
  o mptfusion: delete watchdogs timers from mptctl and mptscsih

Guennadi Liakhovetski:
  o dc395x: Fix support for highmem

James Bottomley:
  o FC Remote Port Patch
  o SCSI: dc395x.c add missing #include 
  o SCSI: fix transport statistics mismerge
  o Add statistics to generic transport class
  o SCSI: revamp target scanning routines
  o SCSI: fix io statistics compile warnings
  o SCSI: Add device io statistics
  o SCSI: fix compat_ioctl compile warnings

James Smart:
  o add per scsi-host workqueues for defered processing

Kai Mäkisara:
  o SCSI tape security: require CAP_ADMIN for SG_IO etc
  o SCSI tape fixes: remove f_pos handling
  o SCSI tape fixes (new version): sense descriptor
  o SCSI tape fixes: sense descriptor init, bsf->weof, blkno,
  o SCSI tape: write filemark before rewind etc. when writing
  o SCSI tape descriptor based sense data support

Kenn Humborg:
  o NCR5380 delayed work fix and locking fix

Mark Haverkamp:
  o aacraid: adapter naming fix

Matthew Wilcox:
  o sym2 version 2.2.0
  o Use spi_display_xfer_agreement() in 53c700
  o Display SPI transfer agreement in common code
  o scsi: remove device_request_lock

Mike Anderson:
  o SCSI: Add TASK_ABORTED to status_byte macro

And the diffstat is:

 b/Documentation/kernel-parameters.txt   |3 
 b/Documentation/scsi/st.txt |5 
 b/Documentation/scsi/sym53c8xx_2.txt|2 
 b/drivers/base/transport_class.c|   24 
 b/drivers/message/fusion/mptbase.h  |   10 
 b/drivers/message/fusion/mptctl.c   |  630 +-
 b/drivers/message/fusion/mptscsih.c |  185 +---
 b/drivers/pci/pci.ids   |7 
 b/drivers/scsi/53c700.c |   16 
 b/drivers/scsi/Kconfig  |4 
 b/drivers/scsi/NCR5380.c|   15 
 b/drivers/scsi/NCR_D700.c   |4 
 b/drivers/scsi/aacraid/linit.c  |  115 +-
 b/drivers/scsi/dc395x.c |   49 -
 b/drivers/scsi/hosts.c  |   41 
 b/drivers/scsi/ipr.c|  248 +++--
 b/drivers/scsi/ipr.h|  201 ++--
 b/drivers/scsi/megaraid/megaraid_mm.c   |   26 
 b/drivers/scsi/osst.c   |   19 
 b/drivers/scsi/qla1280.c|  146 ---
 b/drivers/scsi/scsi.c   |  105 ++
 b/drivers/scsi/scsi_devinfo.c   |4 
 b/drivers/scsi/scsi_error.c |   13 
 b/drivers/scsi/scsi_lib.c   |   61 +
 b/drivers/scsi/scsi_scan.c  |  266 --
 b/drivers/scsi/scsi_sysfs.c |  188 +---
 b/drivers/scsi/scsi_transport_fc.c  | 1092 -
 b/drivers/scsi/scsi_transport_iscsi.c   |   30 
 b/drivers/scsi/scsi_transport_spi.c |  213 +++--
 b/drivers/scsi/sd.c |   39 
 b/drivers/scsi/sg.c |   26 
 b/drivers/scsi/sim710.c |6 
 b/drivers/scsi/sr.c |4 
 b/drivers/scsi/st.c |  426 +-
 b/drivers/scsi/st.h |   19 
 b/drivers/scsi/sym53c8xx_2/Makefile |2 
 b/drivers/scsi/sym53c8xx_2/sym53c8xx.h  |   60 +
 b/drivers/scsi/sym53c8xx_2/sym_defs.h   |4 
 b/drivers/scsi/sym53c8xx_2/sym_fw.c |2 
 b/drivers/scsi/sym53c8xx_2/sym_

Problem with MPT in 2.4.X

2005-03-15 Thread Jean Tourrilhes
Hi,

I have a problem with a system which use a MPT SCSI host and a
Maxtor drive. After a few days the scsi subsystem throw zillions of
errors and can't access the disk anymore. The only way out is the
reset button.
The system came with SCSI preinstalled, the MPT is on the
motherboard, both the cable and the drive were factory installed, and
I checked that it looks ok. I've installed a second drive after the
last reset, just in case, but the crashes were without it.
I've found in the log some SCSI errors, a few samples are
listed below. I think there were more than those, but without a disk
to save them on...
What I'm wondering is which part is bad, the drive, the cable
or the driver (I'm using 2.4.29). Thanks in advance for clues...

Regards,

Jean

-

SCSI subsystem driver Revision: 1.00
kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2
Fusion MPT base driver 2.05.16
Copyright (c) 1999-2004 LSI Logic Corporation
mptbase: Initiating ioc0 bringup
ioc0: 53C1030: Capabilities={Initiator}
mptbase: Initiating ioc1 bringup
ioc1: 53C1030: Capabilities={Initiator}
mptbase: 2 MPT adapters found, 2 installed.
Fusion MPT SCSI Host driver 2.05.16
scsi0 : ioc0: LSI53C1030, FwRev=01030800h, Ports=1, MaxQ=222, IRQ=30
scsi1 : ioc1: LSI53C1030, FwRev=01030800h, Ports=1, MaxQ=222, IRQ=31
blk: queue f7bf2c18, I/O limit 4294967295Mb (mask 0x)
  Vendor: MAXTORModel: ATLAS15K2_146WLS  Rev: HPM0
  Type:   Direct-Access  ANSI SCSI revision: 03
blk: queue f7bf2a18, I/O limit 4294967295Mb (mask 0x)
  Vendor: SEAGATE   Model: ST34501W  Rev: 8301
  Type:   Direct-Access  ANSI SCSI revision: 02
blk: queue f7bf2618, I/O limit 4294967295Mb (mask 0x)
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi disk sdb at scsi0, channel 0, id 3, lun 0
SCSI device sda: 286749488 512-byte hdwr sectors (146816 MB)
Partition check:
 sda: sda1 sda2 sda3 < sda5 sda6 sda7 >
SCSI device sdb: 8887200 512-byte hdwr sectors (4550 MB)
 sdb:
--
SCSI Error: (0:0:0) Status=02h (CHECK CONDITION)
 Key=Bh (ABORTED COMMAND); FRU=00h
 ASC/ASCQ=47h/03h ""
 CDB: 2A 00 00 18 00 5F 00 00 28 00
---
scsi0 channel 0 : resetting for second half of retries.
SCSI bus is being reset for host 0 channel 0.
mptscsih: OldReset scheduling BUS_RESET (sc=f7b22a00)
---
SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 1802
Info fld=0x7c0077, Current sd08:01: sense key Aborted Command
Additional sense indicates Information unit CRC error detected
 I/O error: dev 08:01, sector 8126520
---
scsi0 channel 0 : resetting for second half of retries.
SCSI bus is being reset for host 0 channel 0.
mptscsih: OldReset scheduling BUS_RESET (sc=f7b22a00)
scsi : aborting command due to timeout : pid 722035, scsi0, channel 0, id 0, 
lun 0 Write (10) 00 00 00 2e 07 00 00 88 00 
---

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 2.6.10 devfs oops without devfs mounted at all

2005-03-15 Thread Andrew Morton

(This is from Feb 10)..

An oops during execution of megamgr.bin.

Sergey, I assume this bug is still happening in current kernels?

If so, could you please remind us how to reproduce it and send the .config
file?

Thanks.

"Sergey S. Kostyliov" <[EMAIL PROTECTED]> wrote:
>
> On Thursday 10 February 2005 12:49, Sergey S. Kostyliov wrote:
> > On Thursday 10 February 2005 03:36, Andrew Morton wrote:
> > > "Sergey S. Kostyliov" <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Here is an oops I've just get on my smp system:
> > > > 
> > > > Unable to handle kernel NULL pointer dereference at virtual address 
> > > > 001c
> > > >  printing eip:
> > > > c01afe5b
> > > > *pde = 
> > > > Oops:  [#1]
> > > > PREEMPT SMP
> > > > Modules linked in: ipt_REJECT ipt_state ip_conntrack iptable_filter
> > > > CPU:2
> > > > EIP:0060:[]Not tainted VLI
> > > > EFLAGS: 00010286   (2.6.10)
> > > > EIP is at devfsd_close+0x1b/0xc8
> > > > eax: f7440a00   ebx:    ecx: c01afe40   edx: ed395280
> > > > esi:    edi: f7f17800   ebp: f74f96c8   esp: cdc70f84
> > > > ds: 007b   es: 007b   ss: 0068
> > > > Process megamgr.bin (pid: 12844, threadinfo=cdc7 task=dd81e520)
> > > > Stack: ed395280 ed395280  f7f17800 c0150c76 ee9e87f8 ed395280 
> > > > 
> > > >f1985c80 cdc7 c014f50f 0003 0003 080caa60  
> > > > c01024df
> > > >0003 080cc700 bfffe4f8 080caa60  bfffe4fc 0006 
> > > > 007b
> > > > Call Trace:
> > > >  [] __fput+0x106/0x120
> > > >  [] filp_close+0x4f/0x80
> > > >  [] syscall_call+0x7/0xb
> > > 
> > > Can you work out what file is being closed?  One way of doing that would 
> > > be
> > > to work out how megamgr.bin is being invoked and to then run it by hand:
> > > 
> > >  strace -f -o log megamgr.bin 
> > > 
> > > and we can then use the strace output to work out the pathname of the
> > > offending file.
> > 
> > [EMAIL PROTECTED] rathamahata $ grep 'open(' mg.log
> > 5255  open("/usr/share/terminfo/l/linux", O_RDONLY) = 3
> > 5255  open("/dev/megadev0", O_RDONLY)   = 3
> > [EMAIL PROTECTED] rathamahata $
> Sorry, I forgot this part:
> [EMAIL PROTECTED] rathamahata $ grep 'close(' mg.log
> 5255  close(3)  = 0
> [EMAIL PROTECTED] rathamahata $
> 
> > 
> > I guess it's /dev/megadev0 (manually created character device)
> > 
> > [EMAIL PROTECTED] rathamahata $ ls -la /dev/megadev0
> > crw-r--r--  1 root root 253, 0 Feb  8 16:26 /dev/megadev0
> > [EMAIL PROTECTED] rathamahata 
> > 
> 
> -- 
> Sergey S. Kostyliov <[EMAIL PROTECTED]>
> Jabber ID: [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 06/11] drivers/scsi/aacraid/*: convert to pci_register_driver

2005-03-15 Thread Domen Puncer
On 15/03/05 12:59 -0500, Salyzyn, Mark wrote:
> FC3 != kernel.org, and the problem may not exist in latest tree. The
> code for pci_module_init used to do a return (ret < 0) ? ret : 0.
> 
> The problem is then a 'transition' issue, as patches that appear here
> can and will be used for kernel revisions a few back. By changing the
> aacraid driver to check for < 0 rather than != 0 we improve reliability.
> I have discovered that by doing so, the driver in the Adaptec Branch
> taking this patch works fine all the way back early 2.4 trees.
> 

Thanks for clearing that up.
Forgot that scsi is 2.4 compatible. And I have a note to drop
pci_register_driver patches for it. Sorry for all the noise.

So, here's a new patch, if someone wants it; i won't be resending :-)


Use pci_register_driver instead of pci_module_init (old API).

Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>

--- ./drivers/scsi/aacraid/linit.c.orig 2005-03-15 21:05:53.0 +0100
+++ ./drivers/scsi/aacraid/linit.c  2005-03-15 21:06:59.0 +0100
@@ -686,12 +686,12 @@ static struct pci_driver aac_pci_driver 
 static int __init aac_init(void)
 {
int error;
-   
+
printk(KERN_INFO "Red Hat/Adaptec aacraid driver (%s %s)\n",
AAC_DRIVER_VERSION, AAC_DRIVER_BUILD_DATE);
 
-   error = pci_module_init(&aac_pci_driver);
-   if (error)
+   error = pci_register_driver(&aac_pci_driver);
+   if (error < 0)
return error;
 
aac_cfg_major = register_chrdev( 0, "aac", &aac_cfg_fops);
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] SCSI tape fixes (new version): sense descriptor init, bsf->weof, blkno, debugging

2005-03-15 Thread Kai Makisara
On Tue, 15 Mar 2005, James Bottomley wrote:

> On Sat, 2005-03-12 at 19:04 +0200, Kai Makisara wrote:
> > This is an updated version of the patch I sent March 7. The sense descriptor
> > initialization has been made lighter.
> > 
> > The patch at the end of this message applies to 2.6.11-bk7 + st descriptor 
> > sense
> > patch + st auto eof patch (i.e., st patches currently in scsi-misc-2.6). The
> > patch fixes the following problems:
> 
> I'm afraid this doesn't apply.  It looks like I've got an interim patch
> that's crept in somewhere in the tree.
> 
> Could you take a look at scsi-misc-2.6 (or the patches on www.parisc-
> linux/~jejb/scsi_diffs) and see if you can construct a diff between
> where I currently am and where I should be?
> 
The changelog shows that the patch below is included. It is the previous 
version of the patch in the message with this subject.

# ChangeSet
#   2005/03/15 10:37:07-06:00 [EMAIL PROTECTED] 
#   [PATCH] SCSI tape fixes: sense descriptor init, bsf->weof, blkno,

The patch at the end of this message should take you into the point where 
you can directly apply 2/2 etc. (If you think that the patch below is not 
worth the trouble, you can skip that. The other patches are not touching 
verstr and should then apply with small offset.)

Thanks,
Kai

This patch changes the sense descriptor initialization a little faster.

Signed-off-by: Kai Makisara <[EMAIL PROTECTED]>

--- linux-2.6.11-kk1/drivers/scsi/st.c  2005-03-15 20:55:12.0 +0200
+++ linux-2.6.11-bk7-k2/drivers/scsi/st.c   2005-03-12 13:52:30.0 
+0200
@@ -17,7 +17,7 @@
Last modified: 18-JAN-1998 Richard Gooch <[EMAIL PROTECTED]> Devfs support
  */
 
-static char *verstr = "20050307";
+static char *verstr = "20050312";
 
 #include 
 
@@ -268,10 +268,11 @@ static void st_analyze_sense(struct scsi
const u8 *ucp;
const u8 *sense = SRpnt->sr_sense_buffer;
 
-   memset(s, 0, sizeof(struct st_cmdstatus));
s->have_sense = scsi_request_normalize_sense(SRpnt, &s->sense_hdr);
+   s->flags = 0;
 
if (s->have_sense) {
+   s->deferred = 0;
s->remainder_valid =
scsi_get_sense_info_fld(sense, SCSI_SENSE_BUFFERSIZE, 
&s->uremainder64);
switch (sense[0] & 0x7f) {
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] SCSI tape fixes (new version): sense descriptor init, bsf->weof, blkno, debugging

2005-03-15 Thread James Bottomley
On Sat, 2005-03-12 at 19:04 +0200, Kai Makisara wrote:
> This is an updated version of the patch I sent March 7. The sense descriptor
> initialization has been made lighter.
> 
> The patch at the end of this message applies to 2.6.11-bk7 + st descriptor 
> sense
> patch + st auto eof patch (i.e., st patches currently in scsi-misc-2.6). The
> patch fixes the following problems:

I'm afraid this doesn't apply.  It looks like I've got an interim patch
that's crept in somewhere in the tree.

Could you take a look at scsi-misc-2.6 (or the patches on www.parisc-
linux/~jejb/scsi_diffs) and see if you can construct a diff between
where I currently am and where I should be?

Thanks,

James


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [patch 06/11] drivers/scsi/aacraid/*: convert to pci_register_driver

2005-03-15 Thread Salyzyn, Mark
FC3 != kernel.org, and the problem may not exist in latest tree. The
code for pci_module_init used to do a return (ret < 0) ? ret : 0.

The problem is then a 'transition' issue, as patches that appear here
can and will be used for kernel revisions a few back. By changing the
aacraid driver to check for < 0 rather than != 0 we improve reliability.
I have discovered that by doing so, the driver in the Adaptec Branch
taking this patch works fine all the way back early 2.4 trees.

Sincerely -- Mark Salyzyn

-Original Message-
From: Domen Puncer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 12:45 PM
To: Salyzyn, Mark
Cc: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org;
[EMAIL PROTECTED]
Subject: Re: [patch 06/11] drivers/scsi/aacraid/*: convert to
pci_register_driver

On 15/03/05 10:59 -0500, Salyzyn, Mark wrote:
> We have tested and seen a positive number being returned on late model
> distributions (FC3)

Function tree from 2.6.11-bk9:

pci_register_driver
  driver_register
bus_add_driver
  kobject_set_name - ok
  kobject_register
kobject_add
  create_dir
sysfs_create_dir
  create_dir (different from above)
sysfs_create
  init (init_dir from sysfs/dir.c) - ok
sysfs_make_dirent - ok
populate_dir
  sysfs_create_file
sysfs_add_file
  sysfs_make_dirent - ok


Seems ok to me. Am I missing something?
How about a "if (error > 0) dump_stack()" to find the offender?

> 
> Sincerely -- Mark Salyzyn
> 
> -Original Message-
> From: Domen Puncer [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 15, 2005 10:57 AM
> To: Salyzyn, Mark
> Cc: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org;
> [EMAIL PROTECTED]
> Subject: Re: [patch 06/11] drivers/scsi/aacraid/*: convert to
> pci_register_driver
> 
> On 15/03/05 08:38 -0500, Salyzyn, Mark wrote:
> > I have to reject this change since pci_module_init() has a different
> > return code than pci_register_driver().
> 
> pci.h: #define pci_module_init pci_register_driver
> 
> pci-driver.c: pci_register_driver:
>   "Returns a negative value on error, otherwise 0."
> 
> So... since it can't return positive number, these conditions are the
> same.
> 
> 
> > 
> > The patch should look like:
> > 
> > -   error = pci_module_init(&aac_pci_driver);
> > +   error = pci_register_driver(&aac_pci_driver);
> > -   if (error)
> > +   if (error < 0)
> > return error;
> > 
> > Sincerely -- Mark Salyzyn
> > 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
> > [EMAIL PROTECTED]
> > Sent: Sunday, March 06, 2005 5:27 PM
> > To: [EMAIL PROTECTED]
> > Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> > Subject: [patch 06/11] drivers/scsi/aacraid/*: convert to
> > pci_register_driver
> > 
> > 
> > convert from pci_module_init to pci_register_driver
> > (from:http://kerneljanitors.org/TODO).
> > 
> > Signed-off-by: Christophe Lucas <[EMAIL PROTECTED]>
> > Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
> > ---
> > 
> > 
> >  kj-domen/drivers/scsi/aacraid/linit.c |2 +-
> >  1 files changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff -puN
> >
drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
> > drivers/scsi/aacraid/linit.c
> > ---
> >
>
kj/drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
> > 2005-03-05 16:12:51.0 +0100
> > +++ kj-domen/drivers/scsi/aacraid/linit.c   2005-03-05
> > 16:12:51.0 +0100
> > @@ -690,7 +690,7 @@ static int __init aac_init(void)
> > printk(KERN_INFO "Red Hat/Adaptec aacraid driver (%s %s)\n",
> > AAC_DRIVER_VERSION, AAC_DRIVER_BUILD_DATE);
> >  
> > -   error = pci_module_init(&aac_pci_driver);
> > +   error = pci_register_driver(&aac_pci_driver);
> > if (error)
> > return error;
> >  
> > _
> > -
> > To unsubscribe from this list: send the line "unsubscribe
linux-scsi"
> in
> > the body of a message to [EMAIL PROTECTED]
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 06/11] drivers/scsi/aacraid/*: convert to pci_register_driver

2005-03-15 Thread Domen Puncer
On 15/03/05 10:59 -0500, Salyzyn, Mark wrote:
> We have tested and seen a positive number being returned on late model
> distributions (FC3)

Function tree from 2.6.11-bk9:

pci_register_driver
  driver_register
bus_add_driver
  kobject_set_name - ok
  kobject_register
kobject_add
  create_dir
sysfs_create_dir
  create_dir (different from above)
sysfs_create
  init (init_dir from sysfs/dir.c) - ok
sysfs_make_dirent - ok
populate_dir
  sysfs_create_file
sysfs_add_file
  sysfs_make_dirent - ok


Seems ok to me. Am I missing something?
How about a "if (error > 0) dump_stack()" to find the offender?

> 
> Sincerely -- Mark Salyzyn
> 
> -Original Message-
> From: Domen Puncer [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 15, 2005 10:57 AM
> To: Salyzyn, Mark
> Cc: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org;
> [EMAIL PROTECTED]
> Subject: Re: [patch 06/11] drivers/scsi/aacraid/*: convert to
> pci_register_driver
> 
> On 15/03/05 08:38 -0500, Salyzyn, Mark wrote:
> > I have to reject this change since pci_module_init() has a different
> > return code than pci_register_driver().
> 
> pci.h: #define pci_module_init pci_register_driver
> 
> pci-driver.c: pci_register_driver:
>   "Returns a negative value on error, otherwise 0."
> 
> So... since it can't return positive number, these conditions are the
> same.
> 
> 
> > 
> > The patch should look like:
> > 
> > -   error = pci_module_init(&aac_pci_driver);
> > +   error = pci_register_driver(&aac_pci_driver);
> > -   if (error)
> > +   if (error < 0)
> > return error;
> > 
> > Sincerely -- Mark Salyzyn
> > 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
> > [EMAIL PROTECTED]
> > Sent: Sunday, March 06, 2005 5:27 PM
> > To: [EMAIL PROTECTED]
> > Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> > Subject: [patch 06/11] drivers/scsi/aacraid/*: convert to
> > pci_register_driver
> > 
> > 
> > convert from pci_module_init to pci_register_driver
> > (from:http://kerneljanitors.org/TODO).
> > 
> > Signed-off-by: Christophe Lucas <[EMAIL PROTECTED]>
> > Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
> > ---
> > 
> > 
> >  kj-domen/drivers/scsi/aacraid/linit.c |2 +-
> >  1 files changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff -puN
> > drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
> > drivers/scsi/aacraid/linit.c
> > ---
> >
> kj/drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
> > 2005-03-05 16:12:51.0 +0100
> > +++ kj-domen/drivers/scsi/aacraid/linit.c   2005-03-05
> > 16:12:51.0 +0100
> > @@ -690,7 +690,7 @@ static int __init aac_init(void)
> > printk(KERN_INFO "Red Hat/Adaptec aacraid driver (%s %s)\n",
> > AAC_DRIVER_VERSION, AAC_DRIVER_BUILD_DATE);
> >  
> > -   error = pci_module_init(&aac_pci_driver);
> > +   error = pci_register_driver(&aac_pci_driver);
> > if (error)
> > return error;
> >  
> > _
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-scsi"
> in
> > the body of a message to [EMAIL PROTECTED]
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [patch 06/11] drivers/scsi/aacraid/*: convert to pci_register_driver

2005-03-15 Thread Salyzyn, Mark
We have tested and seen a positive number being returned on late model
distributions (FC3)

Sincerely -- Mark Salyzyn

-Original Message-
From: Domen Puncer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 15, 2005 10:57 AM
To: Salyzyn, Mark
Cc: [EMAIL PROTECTED]; linux-scsi@vger.kernel.org;
[EMAIL PROTECTED]
Subject: Re: [patch 06/11] drivers/scsi/aacraid/*: convert to
pci_register_driver

On 15/03/05 08:38 -0500, Salyzyn, Mark wrote:
> I have to reject this change since pci_module_init() has a different
> return code than pci_register_driver().

pci.h: #define pci_module_init pci_register_driver

pci-driver.c: pci_register_driver:
"Returns a negative value on error, otherwise 0."

So... since it can't return positive number, these conditions are the
same.


> 
> The patch should look like:
> 
> - error = pci_module_init(&aac_pci_driver);
> + error = pci_register_driver(&aac_pci_driver);
> - if (error)
> + if (error < 0)
>   return error;
> 
> Sincerely -- Mark Salyzyn
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Sunday, March 06, 2005 5:27 PM
> To: [EMAIL PROTECTED]
> Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED];
[EMAIL PROTECTED]
> Subject: [patch 06/11] drivers/scsi/aacraid/*: convert to
> pci_register_driver
> 
> 
> convert from pci_module_init to pci_register_driver
> (from:http://kerneljanitors.org/TODO).
> 
> Signed-off-by: Christophe Lucas <[EMAIL PROTECTED]>
> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
> ---
> 
> 
>  kj-domen/drivers/scsi/aacraid/linit.c |2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff -puN
> drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
> drivers/scsi/aacraid/linit.c
> ---
>
kj/drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
> 2005-03-05 16:12:51.0 +0100
> +++ kj-domen/drivers/scsi/aacraid/linit.c 2005-03-05
> 16:12:51.0 +0100
> @@ -690,7 +690,7 @@ static int __init aac_init(void)
>   printk(KERN_INFO "Red Hat/Adaptec aacraid driver (%s %s)\n",
>   AAC_DRIVER_VERSION, AAC_DRIVER_BUILD_DATE);
>  
> - error = pci_module_init(&aac_pci_driver);
> + error = pci_register_driver(&aac_pci_driver);
>   if (error)
>   return error;
>  
> _
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi"
in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 06/11] drivers/scsi/aacraid/*: convert to pci_register_driver

2005-03-15 Thread Domen Puncer
On 15/03/05 08:38 -0500, Salyzyn, Mark wrote:
> I have to reject this change since pci_module_init() has a different
> return code than pci_register_driver().

pci.h: #define pci_module_init pci_register_driver

pci-driver.c: pci_register_driver:
"Returns a negative value on error, otherwise 0."

So... since it can't return positive number, these conditions are the same.


> 
> The patch should look like:
> 
> - error = pci_module_init(&aac_pci_driver);
> + error = pci_register_driver(&aac_pci_driver);
> - if (error)
> + if (error < 0)
>   return error;
> 
> Sincerely -- Mark Salyzyn
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Sunday, March 06, 2005 5:27 PM
> To: [EMAIL PROTECTED]
> Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [patch 06/11] drivers/scsi/aacraid/*: convert to
> pci_register_driver
> 
> 
> convert from pci_module_init to pci_register_driver
> (from:http://kerneljanitors.org/TODO).
> 
> Signed-off-by: Christophe Lucas <[EMAIL PROTECTED]>
> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
> ---
> 
> 
>  kj-domen/drivers/scsi/aacraid/linit.c |2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff -puN
> drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
> drivers/scsi/aacraid/linit.c
> ---
> kj/drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
> 2005-03-05 16:12:51.0 +0100
> +++ kj-domen/drivers/scsi/aacraid/linit.c 2005-03-05
> 16:12:51.0 +0100
> @@ -690,7 +690,7 @@ static int __init aac_init(void)
>   printk(KERN_INFO "Red Hat/Adaptec aacraid driver (%s %s)\n",
>   AAC_DRIVER_VERSION, AAC_DRIVER_BUILD_DATE);
>  
> - error = pci_module_init(&aac_pci_driver);
> + error = pci_register_driver(&aac_pci_driver);
>   if (error)
>   return error;
>  
> _
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: 2.6.11-mm3: megaraid_sas.c: stack usage

2005-03-15 Thread Bagalkote, Sreenivas
>On Sat, Mar 12, 2005 at 03:42:22AM -0800, Andrew Morton wrote:
>>...
>> All 606 patches:
>>...
>> megaraid_sas-announcing-new-module-for.patch
>>   megaraid_sas: Announcing new module for LSI Logic's SAS 
>based MegaRAID controllers
>>...
>
>Enormous stack usage:
>- megasas_init_mfi (due to ctrl_info)
>
>Big stack usage:
>- megasas_mgmt_ioctl (due to uioc and dv)
>- megasas_mgmt_fw_ioctl (due to uioc)
>
>Please fix this.
> 

Will do.

Thanks,
Sreenivas
LSI Logic Corporation
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


2.6.11-mm3: megaraid_sas.c: stack usage

2005-03-15 Thread Adrian Bunk
On Sat, Mar 12, 2005 at 03:42:22AM -0800, Andrew Morton wrote:
>...
> All 606 patches:
>...
> megaraid_sas-announcing-new-module-for.patch
>   megaraid_sas: Announcing new module for LSI Logic's SAS based MegaRAID 
> controllers
>...

Enormous stack usage:
- megasas_init_mfi (due to ctrl_info)

Big stack usage:
- megasas_mgmt_ioctl (due to uioc and dv)
- megasas_mgmt_fw_ioctl (due to uioc)

Please fix this.
 
cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [patch 06/11] drivers/scsi/aacraid/*: convert to pci_register_driver

2005-03-15 Thread Salyzyn, Mark
I have to reject this change since pci_module_init() has a different
return code than pci_register_driver().

The patch should look like:

-   error = pci_module_init(&aac_pci_driver);
+   error = pci_register_driver(&aac_pci_driver);
-   if (error)
+   if (error < 0)
return error;

Sincerely -- Mark Salyzyn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, March 06, 2005 5:27 PM
To: [EMAIL PROTECTED]
Cc: linux-scsi@vger.kernel.org; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [patch 06/11] drivers/scsi/aacraid/*: convert to
pci_register_driver


convert from pci_module_init to pci_register_driver
(from:http://kerneljanitors.org/TODO).

Signed-off-by: Christophe Lucas <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>
---


 kj-domen/drivers/scsi/aacraid/linit.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN
drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
drivers/scsi/aacraid/linit.c
---
kj/drivers/scsi/aacraid/linit.c~pci_register_driver-drivers_scsi_aacraid
2005-03-05 16:12:51.0 +0100
+++ kj-domen/drivers/scsi/aacraid/linit.c   2005-03-05
16:12:51.0 +0100
@@ -690,7 +690,7 @@ static int __init aac_init(void)
printk(KERN_INFO "Red Hat/Adaptec aacraid driver (%s %s)\n",
AAC_DRIVER_VERSION, AAC_DRIVER_BUILD_DATE);
 
-   error = pci_module_init(&aac_pci_driver);
+   error = pci_register_driver(&aac_pci_driver);
if (error)
return error;
 
_
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html