[2.6 patch] scsi/qla4xxx/ql4_isr.c: remove dead code

2008-02-19 Thread Adrian Bunk
This patch removes dead code spotted by the Coverity checker.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/qla4xxx/ql4_isr.c |   18 +-
 1 file changed, 1 insertion(+), 17 deletions(-)

--- linux-2.6/drivers/scsi/qla4xxx/ql4_isr.c.old2008-02-19 
20:29:16.0 +0200
+++ linux-2.6/drivers/scsi/qla4xxx/ql4_isr.c2008-02-19 20:30:37.0 
+0200
@@ -91,38 +91,22 @@ static void qla4xxx_status_entry(struct 
if (scsi_status == 0) {
cmd-result = DID_OK  16;
break;
}
 
if (sts_entry-iscsiFlags  ISCSI_FLAG_RESIDUAL_OVER) {
cmd-result = DID_ERROR  16;
break;
}
 
-   if (sts_entry-iscsiFlags ISCSI_FLAG_RESIDUAL_UNDER) {
+   if (sts_entry-iscsiFlags ISCSI_FLAG_RESIDUAL_UNDER)
scsi_set_resid(cmd, residual);
-   if (!scsi_status  ((scsi_bufflen(cmd) - residual) 
-   cmd-underflow)) {
-
-   cmd-result = DID_ERROR  16;
-
-   DEBUG2(printk(scsi%ld:%d:%d:%d: %s: 
-   Mid-layer Data underrun0, 
-   xferlen = 0x%x, 
-   residual = 0x%x\n, ha-host_no,
-   cmd-device-channel,
-   cmd-device-id,
-   cmd-device-lun, __func__,
-   scsi_bufflen(cmd), residual));
-   break;
-   }
-   }
 
cmd-result = DID_OK  16 | scsi_status;
 
if (scsi_status != SCSI_CHECK_CONDITION)
break;
 
/* Copy Sense Data into sense buffer. */
memset(cmd-sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
 
sensebytecnt = le16_to_cpu(sts_entry-senseDataByteCnt);

-
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 patch] make lpfc_disable_node() static

2008-02-14 Thread Adrian Bunk
This patch makes theneedlessly global lpfc_disable_node() static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/lpfc/lpfc_crtn.h|1 -
 drivers/scsi/lpfc/lpfc_hbadisc.c |2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

c3ed441728e0116d0e545837d84cbe337740a3de diff --git 
a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h
index 848d977..0819f5f 100644
--- a/drivers/scsi/lpfc/lpfc_crtn.h
+++ b/drivers/scsi/lpfc/lpfc_crtn.h
@@ -55,7 +55,6 @@ void lpfc_mbx_cmpl_ns_reg_login(struct lpfc_hba *, 
LPFC_MBOXQ_t *);
 void lpfc_mbx_cmpl_fdmi_reg_login(struct lpfc_hba *, LPFC_MBOXQ_t *);
 void lpfc_enqueue_node(struct lpfc_vport *, struct lpfc_nodelist *);
 void lpfc_dequeue_node(struct lpfc_vport *, struct lpfc_nodelist *);
-void lpfc_disable_node(struct lpfc_vport *, struct lpfc_nodelist *);
 struct lpfc_nodelist *lpfc_enable_node(struct lpfc_vport *,
struct lpfc_nodelist *, int);
 void lpfc_nlp_set_state(struct lpfc_vport *, struct lpfc_nodelist *, int);
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index bd572d6..9766534 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -1694,7 +1694,7 @@ lpfc_dequeue_node(struct lpfc_vport *vport, struct 
lpfc_nodelist *ndlp)
NLP_STE_UNUSED_NODE);
 }
 
-void
+static void
 lpfc_disable_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
 {
if ((ndlp-nlp_flag  NLP_DELAY_TMO) != 0)

-
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 patch] make scsi_end_bidi_request() static

2008-02-13 Thread Adrian Bunk
This patch makes the needlessly global scsi_end_bidi_request() static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
48e50a33ee11afb02eadc790ae2d9542b0805608 
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index b12fb31..148c8b0 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -785,7 +785,7 @@ EXPORT_SYMBOL(scsi_release_buffers);
  * in req-data_len and req-next_rq-data_len. The upper-layer driver can
  * decide what to do with this information.
  */
-void scsi_end_bidi_request(struct scsi_cmnd *cmd)
+static void scsi_end_bidi_request(struct scsi_cmnd *cmd)
 {
struct request *req = cmd-request;
unsigned int dlen = req-data_len;

-
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 patch] scsi_transport_iscsi.c: make 2 functions static

2008-02-13 Thread Adrian Bunk
This patch makes the following needlessly global functions static:
- __iscsi_unblock_session()
- iscsi_session_state_name()

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/scsi_transport_iscsi.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

c7b0a4c74538d3a53cd7325a5ad0f2ae774ebb94 diff --git 
a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index fac7534..9981682 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -231,7 +231,7 @@ static struct {
{ ISCSI_SESSION_FREE,   FREE },
 };
 
-const char *iscsi_session_state_name(int state)
+static const char *iscsi_session_state_name(int state)
 {
int i;
char *name = NULL;
@@ -373,7 +373,7 @@ static void session_recovery_timedout(struct work_struct 
*work)
scsi_target_unblock(session-dev);
 }
 
-void __iscsi_unblock_session(struct iscsi_cls_session *session)
+static void __iscsi_unblock_session(struct iscsi_cls_session *session)
 {
if (!cancel_delayed_work(session-recovery_work))
flush_workqueue(iscsi_eh_timer_workq);

-
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 patch] #if 0 ses_match_host()

2008-02-13 Thread Adrian Bunk
This patch #if 0's the unused ses_match_host()

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/ses.c |2 ++
 1 file changed, 2 insertions(+)

a9b8c5789924c15d23282da4b2e6bf8fa98449a2 diff --git a/drivers/scsi/ses.c 
b/drivers/scsi/ses.c
index 2a6e4f4..9125486 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -261,6 +261,7 @@ struct ses_host_edev {
struct enclosure_device *edev;
 };
 
+#if 0
 int ses_match_host(struct enclosure_device *edev, void *data)
 {
struct ses_host_edev *sed = data;
@@ -277,6 +278,7 @@ int ses_match_host(struct enclosure_device *edev, void 
*data)
sed-edev = edev;
return 1;
 }
+#endif  /*  0  */
 
 static void ses_process_descriptor(struct enclosure_component *ecomp,
   unsigned char *desc)

-
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 patch] scsi/aic94xx/: cleanups

2008-02-13 Thread Adrian Bunk
This patch contains the following cleanups:
- static functions in .c files shouldn't be marked inline
- make needlessly global code static
- remove the unused aic94xx_seq.c:asd_unpause_lseq()
- #if 0 other unused code

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch has been sent on:
- 11 Dec 2007

 drivers/scsi/aic94xx/aic94xx_dev.c  |8 +++---
 drivers/scsi/aic94xx/aic94xx_dump.c |   10 +++-
 drivers/scsi/aic94xx/aic94xx_dump.h |9 ---
 drivers/scsi/aic94xx/aic94xx_hwi.c  |   24 ++--
 drivers/scsi/aic94xx/aic94xx_hwi.h  |2 -
 drivers/scsi/aic94xx/aic94xx_init.c |8 +++---
 drivers/scsi/aic94xx/aic94xx_reg.c  |   33 +---
 drivers/scsi/aic94xx/aic94xx_scb.c  |   33 +++-
 drivers/scsi/aic94xx/aic94xx_sds.c  |4 +--
 drivers/scsi/aic94xx/aic94xx_seq.c  |   31 --
 drivers/scsi/aic94xx/aic94xx_seq.h  |4 ---
 drivers/scsi/aic94xx/aic94xx_task.c |   12 +-
 drivers/scsi/aic94xx/aic94xx_tmf.c  |4 +--
 13 files changed, 78 insertions(+), 104 deletions(-)

9f288d19f08353edb833114b5e573d0ed06700b6 
diff --git a/drivers/scsi/aic94xx/aic94xx_dev.c 
b/drivers/scsi/aic94xx/aic94xx_dev.c
index 3dce618..b5aa4b1 100644
--- a/drivers/scsi/aic94xx/aic94xx_dev.c
+++ b/drivers/scsi/aic94xx/aic94xx_dev.c
@@ -35,7 +35,7 @@
 #define SET_DDB(_ddb, _ha) set_bit(_ddb, (_ha)-hw_prof.ddb_bitmap)
 #define CLEAR_DDB(_ddb, _ha) clear_bit(_ddb, (_ha)-hw_prof.ddb_bitmap)
 
-static inline int asd_get_ddb(struct asd_ha_struct *asd_ha)
+static int asd_get_ddb(struct asd_ha_struct *asd_ha)
 {
int ddb, i;
 
@@ -71,7 +71,7 @@ out:
 #define NCQ_DATA_SCB_PTR offsetof(struct asd_ddb_stp_sata_target_port, 
ncq_data_scb_ptr)
 #define ITNL_TIMEOUToffsetof(struct asd_ddb_ssp_smp_target_port, 
itnl_timeout)
 
-static inline void asd_free_ddb(struct asd_ha_struct *asd_ha, int ddb)
+static void asd_free_ddb(struct asd_ha_struct *asd_ha, int ddb)
 {
if (!ddb || ddb = 0x)
return;
@@ -79,7 +79,7 @@ static inline void asd_free_ddb(struct asd_ha_struct *asd_ha, 
int ddb)
CLEAR_DDB(ddb, asd_ha);
 }
 
-static inline void asd_set_ddb_type(struct domain_device *dev)
+static void asd_set_ddb_type(struct domain_device *dev)
 {
struct asd_ha_struct *asd_ha = dev-port-ha-lldd_ha;
int ddb = (int) (unsigned long) dev-lldd_dev;
@@ -109,7 +109,7 @@ static int asd_init_sata_tag_ddb(struct domain_device *dev)
return 0;
 }
 
-static inline int asd_init_sata(struct domain_device *dev)
+static int asd_init_sata(struct domain_device *dev)
 {
struct asd_ha_struct *asd_ha = dev-port-ha-lldd_ha;
int ddb = (int) (unsigned long) dev-lldd_dev;
diff --git a/drivers/scsi/aic94xx/aic94xx_dump.c 
b/drivers/scsi/aic94xx/aic94xx_dump.c
index 6bd8e30..9d637e2 100644
--- a/drivers/scsi/aic94xx/aic94xx_dump.c
+++ b/drivers/scsi/aic94xx/aic94xx_dump.c
@@ -738,6 +738,8 @@ static void asd_dump_lseq_state(struct asd_ha_struct 
*asd_ha, int lseq)
PRINT_LMIP_dword(asd_ha, lseq, DEV_PRES_TIMER_TERM_TS);
 }
 
+#if 0
+
 /**
  * asd_dump_ddb_site -- dump a CSEQ DDB site
  * @asd_ha: pointer to host adapter structure
@@ -880,6 +882,8 @@ void asd_dump_scb_sites(struct asd_ha_struct *asd_ha)
}
 }
 
+#endif  /*  0  */
+
 /**
  * ads_dump_seq_state -- dump CSEQ and LSEQ states
  * @asd_ha: pointer to host adapter structure
@@ -922,7 +926,9 @@ void asd_dump_frame_rcvd(struct asd_phy *phy,
spin_unlock_irqrestore(phy-sas_phy.frame_rcvd_lock, flags);
 }
 
-static inline void asd_dump_scb(struct asd_ascb *ascb, int ind)
+#if 0
+
+static void asd_dump_scb(struct asd_ascb *ascb, int ind)
 {
asd_printk(scb%d: vaddr: 0x%p, dma_handle: 0x%llx, next: 0x%llx, 
   index:%d, opcode:0x%02x\n,
@@ -956,4 +962,6 @@ void asd_dump_scb_list(struct asd_ascb *ascb, int num)
}
 }
 
+#endif  /*  0  */
+
 #endif /* ASD_DEBUG */
diff --git a/drivers/scsi/aic94xx/aic94xx_dump.h 
b/drivers/scsi/aic94xx/aic94xx_dump.h
index 0c388e7..191a753 100644
--- a/drivers/scsi/aic94xx/aic94xx_dump.h
+++ b/drivers/scsi/aic94xx/aic94xx_dump.h
@@ -29,24 +29,15 @@
 
 #ifdef ASD_DEBUG
 
-void asd_dump_ddb_0(struct asd_ha_struct *asd_ha);
-void asd_dump_target_ddb(struct asd_ha_struct *asd_ha, u16 site_no);
-void asd_dump_scb_sites(struct asd_ha_struct *asd_ha);
 void asd_dump_seq_state(struct asd_ha_struct *asd_ha, u8 lseq_mask);
 void asd_dump_frame_rcvd(struct asd_phy *phy,
 struct done_list_struct *dl);
-void asd_dump_scb_list(struct asd_ascb *ascb, int num);
 #else /* ASD_DEBUG */
 
-static inline void asd_dump_ddb_0(struct asd_ha_struct *asd_ha) { }
-static inline void asd_dump_target_ddb(struct asd_ha_struct *asd_ha,
-u16 site_no) { }
-static inline void asd_dump_scb_sites(struct asd_ha_struct *asd_ha) { }
 static inline void asd_dump_seq_state(struct asd_ha_struct *asd_ha

Re: scsi/arm/fas216.c compile error

2008-02-10 Thread Adrian Bunk
On Sun, Feb 10, 2008 at 03:07:09PM +0200, Boaz Harrosh wrote:
 On Sat, Feb 09 2008 at 2:04 +0200, Adrian Bunk [EMAIL PROTECTED] wrote:
  Commit 30b0c37b27485a9cb897bfe3824f6f517b8c80d6 causes the following 
  compile error:
  
  --  snip  --
  
  ...
CC  drivers/scsi/arm/fas216.o
  /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/arm/fas216.c: In 
  function 'fas216_std_done':
  /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/arm/fas216.c:2120: 
  error: 'struct scsi_cmnd' has no member named 'request_bufflen'
  /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/arm/fas216.c:2122: 
  error: 'struct scsi_cmnd' has no member named 'use_sg'
  make[4]: *** [drivers/scsi/arm/fas216.o] Error 1
  
  --  snip  --
  
  cu
  Adrian
  
 It's in mainline 84ac86ca8c6787f9efff28bc04b1b65fe0a5c310
   [SCSI] arm: convert to accessors and !use_sg cleanup
...

fas216.c != acornscsi.c

 Boaz

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


scsi/arm/fas216.c compile error

2008-02-08 Thread Adrian Bunk
Commit 30b0c37b27485a9cb897bfe3824f6f517b8c80d6 causes the following 
compile error:

--  snip  --

...
  CC  drivers/scsi/arm/fas216.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/arm/fas216.c: In 
function 'fas216_std_done':
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/arm/fas216.c:2120: 
error: 'struct scsi_cmnd' has no member named 'request_bufflen'
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/arm/fas216.c:2122: 
error: 'struct scsi_cmnd' has no member named 'use_sg'
make[4]: *** [drivers/scsi/arm/fas216.o] Error 1

--  snip  --

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


aic7xxx build failure

2008-02-05 Thread Adrian Bunk
Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx 
compilation:

--  snip  --

$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC  drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1

--  snip  --

Next make run brings the same failure in 
drivers/scsi/aic7xxx/aic7xxx_core.c.

With the third make it works.

It might compile for people with SMP systems using -j?

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: aic7xxx build failure

2008-02-05 Thread Adrian Bunk
On Tue, Feb 05, 2008 at 12:18:04PM -0600, James Bottomley wrote:
 
 On Tue, 2008-02-05 at 19:40 +0200, Adrian Bunk wrote:
  Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx 
  compilation:
  
  --  snip  --
  
  $ make O=../out/x86-full
  ...
SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
CC  drivers/scsi/aic7xxx/aic79xx_core.o
  gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
  gcc: no input files
  make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1
 
 Could you run this with V=1 to get us a verbose output of what the exact
 files gcc is failing on are?

make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build 
obj=drivers/scsi
make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build 
obj=drivers/scsi/aacraid
(cat /dev/null; )  drivers/scsi/aacraid/modules.order
make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build 
obj=drivers/scsi/aic7xxx
  cat 
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped
  drivers/scsi/aic7xxx/aic79xx_seq.h
  cat 
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped
  drivers/scsi/aic7xxx/aic79xx_reg.h
  gcc -Wp,-MD,drivers/scsi/aic7xxx/.aic79xx_core.o.d  -nostdinc -isystem 
/usr/lib/gcc/i486-linux-gnu/4.2.3/include -D__KERNEL__ -Iinclude -Iinclude2 
-I/home/bunk/linux/kernel-2.6/git/linux-2.6/include -include 
include/linux/autoconf.h 
-I/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx 
-Idrivers/scsi/aic7xxx -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs 
-fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m32 
-msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 
-march=athlon -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 
-pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx 
-mno-sse2 -mno-3dnow 
-I/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-x86/mach-generic 
-Iinclude/asm-x86/mach-generic 
-I/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-x86/mach-default 
-Iinclude/asm-x86/mach-default -fno-omit-frame-pointer 
-fno-optimize-sibling-calls -fno-stack-protector -Wdeclaration-after-statement 
-Wno-pointer-sign -I/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi 
-Idrivers/scsi  -DKBUILD_STR(s)=#s 
-DKBUILD_BASENAME=KBUILD_STR(aic79xx_core)  
-DKBUILD_MODNAME=KBUILD_STR(aic79xx) -c -o 
drivers/scsi/aic7xxx/aic79xx_core.o drivers/scsi/aic7xxx/aic79xx_core.c
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1
make[3]: *** [drivers/scsi/aic7xxx] Error 2
make[2]: *** [drivers/scsi] Error 2
make[1]: *** [drivers] Error 2
make: *** [sub-make] Error 2


 Thanks,
 
 James

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: aic7xxx build failure

2008-02-05 Thread Adrian Bunk
On Tue, Feb 05, 2008 at 12:30:56PM -0600, James Bottomley wrote:
 
 On Tue, 2008-02-05 at 20:24 +0200, Adrian Bunk wrote:
  On Tue, Feb 05, 2008 at 12:18:04PM -0600, James Bottomley wrote:
   
   On Tue, 2008-02-05 at 19:40 +0200, Adrian Bunk wrote:
Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx 
compilation:

--  snip  --

$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC  drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1
   
   Could you run this with V=1 to get us a verbose output of what the exact
   files gcc is failing on are?
  
  make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build 
  obj=drivers/scsi
  make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build 
  obj=drivers/scsi/aacraid
  (cat /dev/null; )  drivers/scsi/aacraid/modules.order
  make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build 
  obj=drivers/scsi/aic7xxx
cat 
  /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped
drivers/scsi/aic7xxx/aic79xx_seq.h
cat 
  /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped
drivers/scsi/aic7xxx/aic79xx_reg.h
gcc -Wp,-MD,drivers/scsi/aic7xxx/.aic79xx_core.o.d  -nostdinc -isystem 
  /usr/lib/gcc/i486-linux-gnu/4.2.3/include -D__KERNEL__ -Iinclude -Iinclude2 
  -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include -include 
  include/linux/autoconf.h 
  -I/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx 
  -Idrivers/scsi/aic7xxx -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs 
  -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os 
  -m32 -msoft-float -mregparm=3 -freg-struct-return 
  -mpreferred-stack-boundary=2 -march=athlon -ffreestanding -DCONFIG_AS_CFI=1 
  -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare 
  -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow 
  -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-x86/mach-generic 
  -Iinclude/asm-x86/mach-generic 
  -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-x86/mach-default 
  -Iinclude/asm-x86/mach-default -fno-omit-frame-pointer 
  -fno-optimize-sibling-calls -fno-stack-protector 
  -Wdeclaration-after-statement -Wno-pointer-sign 
  -I/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi -Idrivers/scsi  
  -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(aic79xx_core)  
  -DKBUILD_MODNAME=KBUILD_STR(aic79xx) -c -o 
  drivers/scsi/aic7xxx/aic79xx_core.o drivers/scsi/aic7xxx/aic79xx_core.c
  gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
  gcc: no input files
  make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1
  make[3]: *** [drivers/scsi/aic7xxx] Error 2
  make[2]: *** [drivers/scsi] Error 2
  make[1]: *** [drivers] Error 2
  make: *** [sub-make] Error 2
 
 Do I assume from this that you have different source and object
 directories?

Yes, as I wrote in my bug report:
  make O=../out/x86-full

 There shouldn't be a failure if this is building
 in /home/bunk/linux/kernel-2.6/git/linux-2.6/ because the source file
 should be there.
 
 James

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: aic7xxx build failure

2008-02-05 Thread Adrian Bunk
On Tue, Feb 05, 2008 at 09:06:23PM +0100, Sam Ravnborg wrote:
 On Tue, Feb 05, 2008 at 07:47:35PM +0100, Sam Ravnborg wrote:
  On Tue, Feb 05, 2008 at 07:40:24PM +0200, Adrian Bunk wrote:
   Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx 
   compilation:
   
   --  snip  --
   
   $ make O=../out/x86-full
   ...
 SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
 SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
 CC  drivers/scsi/aic7xxx/aic79xx_core.o
   gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
   gcc: no input files
   make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1
   
   --  snip  --
   
   Next make run brings the same failure in 
   drivers/scsi/aic7xxx/aic7xxx_core.c.
   
   With the third make it works.
   
   It might compile for people with SMP systems using -j?
  
  I can reproduce it and will fix it.
 Seems I was sidetracked by some wrong assumptions.
 Could you please test this fix.
 
 Works for me but this time I will do more testing

Thanks, works fine for me.

   Sam
 
 diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile
 index 4c54954..6aa49e7 100644
 --- a/drivers/scsi/aic7xxx/Makefile
 +++ b/drivers/scsi/aic7xxx/Makefile
 @@ -44,8 +44,8 @@ clean-files += aic79xx_seq.h aic79xx_reg.h 
 aic79xx_reg_print.c
  
  # Dependencies for generated files need to be listed explicitly
  
 -$(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h 
 $(obj)/aic7xxx_reg.h
 -$(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h 
 $(obj)/aic79xx_reg.h
 +$(addprefix $(src)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
 +$(addprefix $(src)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
  
  aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h
  aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT)   += 
 $(obj)/aic7xxx_reg_print.c

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] kill hotplug init/exit section annotations

2008-01-31 Thread Adrian Bunk
On Thu, Jan 31, 2008 at 08:11:20AM -0800, Arjan van de Ven wrote:
 On Thu, 31 Jan 2008 09:57:31 -0600
 James Bottomley [EMAIL PROTECTED] wrote:
 
  No-one seems to see much value in these, and they cause about 90% of
  our problems with __init/__exit markers, so simply eliminate them.
  Rather than run over the whole tree removing them, this patch
  #defines them to be nops.
  
  Signed-off-by: James Bottomley [EMAIL PROTECTED]
  
  ---
  
  I'll probably be going after __exit after this one, but it makes sense
  to split them up, since the hotplug annotation removal looks
  uncontroversial, whereas __exit and discard section removal might
  produce more robust debate.  I also think doing the hotplug removal
  gives us 90% of the benefits and removes 90% of the section mismatch
  problems.
 
 
 Since hotplug is so fundamental nowadays the value no longer outweighs the 
 pain/cost
 to me, so 

Granted for normal hotplug.

But my computer has neither CPU hotplug not memory hotplug, and I don't 
see the point for removing these annotations (and they are anyway not 
what causes problems in normal drivers).

 Acked-by: Arjan van de Ven [EMAIL PROTECTED]

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] kill hotplug init/exit section annotations

2008-01-31 Thread Adrian Bunk
On Thu, Jan 31, 2008 at 09:07:49AM -0800, Arjan van de Ven wrote:
 On Thu, 31 Jan 2008 18:21:42 +0200
 Adrian Bunk [EMAIL PROTECTED] wrote:
 
  On Thu, Jan 31, 2008 at 08:11:20AM -0800, Arjan van de Ven wrote:
   On Thu, 31 Jan 2008 09:57:31 -0600
   James Bottomley [EMAIL PROTECTED] wrote:
   
No-one seems to see much value in these, and they cause about 90%
of our problems with __init/__exit markers, so simply eliminate
them. Rather than run over the whole tree removing them, this
patch #defines them to be nops.

Signed-off-by: James Bottomley
[EMAIL PROTECTED]

---

I'll probably be going after __exit after this one, but it makes
sense to split them up, since the hotplug annotation removal looks
uncontroversial, whereas __exit and discard section removal might
produce more robust debate.  I also think doing the hotplug
removal gives us 90% of the benefits and removes 90% of the
section mismatch problems.
   
   
   Since hotplug is so fundamental nowadays the value no longer
   outweighs the pain/cost to me, so 
  
  Granted for normal hotplug.
  
  But my computer has neither CPU hotplug 
 
 cpuhotplug is required for suspend/resume.

Not on UP computers.

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] kill hotplug init/exit section annotations

2008-01-31 Thread Adrian Bunk
On Thu, Jan 31, 2008 at 09:45:26AM -0800, Chris Wedgwood wrote:
 On Thu, Jan 31, 2008 at 07:14:36PM +0200, Adrian Bunk wrote:
 
   cpuhotplug is required for suspend/resume.
 
  Not on UP computers.
 
 those are less and less common now, most modern laptops are dual core

Who was talking about laptops?

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


[2.6 patch] scsi/qlogicpti.c section fixes

2008-01-30 Thread Adrian Bunk
This patch fixes the following section mismatches:

--  snip  --

...
WARNING: drivers/scsi/qlogicpti.o(.devexit.text+0x8): Section mismatch in 
reference from the function qpti_sbus_remove() to the function 
.init.text:qpti_chain_del()
WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x56c): Section mismatch in 
reference from the function qpti_sbus_probe() to the function 
.init.text:qpti_map_regs()
WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x580): Section mismatch in 
reference from the function qpti_sbus_probe() to the function 
.init.text:qpti_register_irq()
WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x594): Section mismatch in 
reference from the function qpti_sbus_probe() to the function 
.init.text:qpti_get_scsi_id()
WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x5b8): Section mismatch in 
reference from the function qpti_sbus_probe() to the function 
.init.text:qpti_map_queues()
WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x780): Section mismatch in 
reference from the function qpti_sbus_probe() to the function 
.init.text:qpti_chain_add()
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/qlogicpti.c |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

3d89831963c0b6f62b24fc4b9dfe1c10d7f90d1b 
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 65455ab..4a1cf63 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -651,7 +651,7 @@ static int qlogicpti_verify_tmon(struct qlogicpti *qpti)
 
 static irqreturn_t qpti_intr(int irq, void *dev_id);
 
-static void __init qpti_chain_add(struct qlogicpti *qpti)
+static void __devinit qpti_chain_add(struct qlogicpti *qpti)
 {
spin_lock_irq(qptichain_lock);
if (qptichain != NULL) {
@@ -667,7 +667,7 @@ static void __init qpti_chain_add(struct qlogicpti *qpti)
spin_unlock_irq(qptichain_lock);
 }
 
-static void __init qpti_chain_del(struct qlogicpti *qpti)
+static void __devexit qpti_chain_del(struct qlogicpti *qpti)
 {
spin_lock_irq(qptichain_lock);
if (qptichain == qpti) {
@@ -682,7 +682,7 @@ static void __init qpti_chain_del(struct qlogicpti *qpti)
spin_unlock_irq(qptichain_lock);
 }
 
-static int __init qpti_map_regs(struct qlogicpti *qpti)
+static int __devinit qpti_map_regs(struct qlogicpti *qpti)
 {
struct sbus_dev *sdev = qpti-sdev;
 
@@ -705,7 +705,7 @@ static int __init qpti_map_regs(struct qlogicpti *qpti)
return 0;
 }
 
-static int __init qpti_register_irq(struct qlogicpti *qpti)
+static int __devinit qpti_register_irq(struct qlogicpti *qpti)
 {
struct sbus_dev *sdev = qpti-sdev;
 
@@ -730,7 +730,7 @@ fail:
return -1;
 }
 
-static void __init qpti_get_scsi_id(struct qlogicpti *qpti)
+static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti)
 {
qpti-scsi_id = prom_getintdefault(qpti-prom_node,
   initiator-id,
@@ -783,7 +783,7 @@ static void qpti_get_clock(struct qlogicpti *qpti)
 /* The request and response queues must each be aligned
  * on a page boundary.
  */
-static int __init qpti_map_queues(struct qlogicpti *qpti)
+static int __devinit qpti_map_queues(struct qlogicpti *qpti)
 {
struct sbus_dev *sdev = qpti-sdev;
 

-
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 patch] scsi/qlogicpti.c section fixes

2008-01-30 Thread Adrian Bunk
On Wed, Jan 30, 2008 at 10:20:11PM +0100, Sam Ravnborg wrote:
 On Wed, Jan 30, 2008 at 03:00:16PM -0600, James Bottomley wrote:
...
 To my understanding Adrian just fixed a potential oops.
 You have a driver that surely are thought to be hotplugable -
 otherwise qpti_sbus_probe() would not have been annotated __devinit.
 And had it ever been hotplugged then you had called a function in
 a __init section that was long gone.
...

s/had it ever been hotplugged/had it been hotplugged with a kernel
  compiled with gcc 3.2 or 3.3/

   Sam

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: [2.6 patch] scsi/qlogicpti.c section fixes

2008-01-30 Thread Adrian Bunk
On Wed, Jan 30, 2008 at 03:00:16PM -0600, James Bottomley wrote:
 
 On Wed, 2008-01-30 at 22:03 +0200, Adrian Bunk wrote:
  This patch fixes the following section mismatches:
  
  --  snip  --
  
  ...
  WARNING: drivers/scsi/qlogicpti.o(.devexit.text+0x8): Section mismatch in 
  reference from the function qpti_sbus_remove() to the function 
  .init.text:qpti_chain_del()
  WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x56c): Section mismatch in 
  reference from the function qpti_sbus_probe() to the function 
  .init.text:qpti_map_regs()
  WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x580): Section mismatch in 
  reference from the function qpti_sbus_probe() to the function 
  .init.text:qpti_register_irq()
  WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x594): Section mismatch in 
  reference from the function qpti_sbus_probe() to the function 
  .init.text:qpti_get_scsi_id()
  WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x5b8): Section mismatch in 
  reference from the function qpti_sbus_probe() to the function 
  .init.text:qpti_map_queues()
  WARNING: drivers/scsi/qlogicpti.o(.devinit.text+0x780): Section mismatch in 
  reference from the function qpti_sbus_probe() to the function 
  .init.text:qpti_chain_add()
  ...
 
 OK, look, this is really getting out of hand.
 
 __init is possibly justifiable with a few hundred k savings on boot.
 __devinit and the rest are surely killable on the grounds they provide
 little benefit for all the pain they cause.
 
 all __exit seems to do is set us up for unreferenced pointers in
 discarded sections, so could we kill that too?

When you are on x86 what you see as Freeing unused kernel memory: 
at the end of booting contains both __init and __exit code.

 James

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


Value of __*{init,exit} anotations?

2008-01-30 Thread Adrian Bunk
On Wed, Jan 30, 2008 at 03:41:35PM -0600, James Bottomley wrote:
 On Wed, 2008-01-30 at 22:20 +0100, Sam Ravnborg wrote:
  On Wed, Jan 30, 2008 at 03:00:16PM -0600, James Bottomley wrote:
...
   __init is possibly justifiable with a few hundred k savings on boot.
   __devinit and the rest are surely killable on the grounds they provide
   little benefit for all the pain they cause.
  For the embedded people a few kb here and there is worth it.
  
   all __exit seems to do is set us up for unreferenced pointers in
   discarded sections, so could we kill that too?
  Again - savings when we build-in the drivers.
  And without the checks we see 'funny' linker errors on the architectues
  that can continue to add the .exit.text in /DISCARD/
 
 Perhaps you have different figures, but my standard kernel linking ones
 tell me that the discard sections only save tens of k (not hundreds that
 the init ones save), so I really do think they have no real benefit and
 land us huge problems of pointer references into discarded sections.
 
 I don't deny we can invest large amounts of work to fix our current
 issues and build large scriptable checks to ensure we keep it fixed ...
 I'm just asking if, at the end of the day, it's really worth it.

Some people consider it worth it for their memory restricted systems
and would like to drive the annotations even further. [1]

My experience while fixing section bugs during the last years is that 
the __dev{init,exit}* are actually the main question since they are both 
the majority of annotations and the ones that bring benefits only 
in a case that has become very exotic (CONFIG_HOTPLUG=n).

All the other annotations either both bring value for everyone
(plain __init* and __exit*) or are nothing normal drivers would
use (__cpu* and _mem*).

People at linux-arch (Cc'ed) might be better at explaining how often 
CONFIG_HOTPLUG gets used in real-life systems and how big the savings 
are there.

That might be a good basis for deciding whether it's worth it.

 James

cu
Adrian

[1] http://lkml.org/lkml/2007/10/12/297

-- 

   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


[2.6 patch] make __iscsi_complete_pdu() static

2008-01-28 Thread Adrian Bunk
__iscsi_complete_pdu() can now become static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/libiscsi.c |5 ++---
 include/scsi/libiscsi.h |2 --
 2 files changed, 2 insertions(+), 5 deletions(-)

4d4f211556f92590bfc32a243f562853c499b314 
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 553168a..e794262 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -541,8 +541,8 @@ static int iscsi_handle_reject(struct iscsi_conn *conn, 
struct iscsi_hdr *hdr,
  * queuecommand or send generic. session lock must be held and verify
  * itt must have been called.
  */
-int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
-char *data, int datalen)
+static int __iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
+   char *data, int datalen)
 {
struct iscsi_session *session = conn-session;
int opcode = hdr-opcode  ISCSI_OPCODE_MASK, rc = 0;
@@ -672,7 +672,6 @@ int __iscsi_complete_pdu(struct iscsi_conn *conn, struct 
iscsi_hdr *hdr,
 
return rc;
 }
-EXPORT_SYMBOL_GPL(__iscsi_complete_pdu);
 
 int iscsi_complete_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
   char *data, int datalen)
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 889f51f..71eda24 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -349,8 +349,6 @@ extern int iscsi_conn_send_pdu(struct iscsi_cls_conn *, 
struct iscsi_hdr *,
char *, uint32_t);
 extern int iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *,
  char *, int);
-extern int __iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *,
-   char *, int);
 extern int iscsi_verify_itt(struct iscsi_conn *, struct iscsi_hdr *,
uint32_t *);
 extern void iscsi_requeue_ctask(struct iscsi_cmd_task *ctask);

-
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


[trivial patch] scsi/ultrastor: clean up inline asm warnings (fwd)

2008-01-22 Thread Adrian Bunk
James, can you review and apply this patch?

TIA
Adrian


- Forwarded message from Frederik Deweerdt [EMAIL PROTECTED] -

Date: Wed, 16 Jan 2008 17:19:08 +0100
From: Frederik Deweerdt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [trivial patch] scsi/ultrastor: clean up inline asm warnings

Hi,

Compiling latest mainline with gcc 4.2.1 spews the following warnings:

drivers/scsi/ultrastor.c: In function 'find_and_clear_bit_16':
drivers/scsi/ultrastor.c:303: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c: At top level:
drivers/scsi/ultrastor.c:1202: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c:1202: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c: In function 'ultrastor_queuecommand':
drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c:698: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a 
register
drivers/scsi/ultrastor.c:302: warning: matching constraint does not allow a 
register

The following patch fixes it by using the '+' operator on the (*field)
operand, marking it as read-write to gcc. I diffed the two resulting .s,
and gcc produced the same code. This was tested with gcc 4.2.1 and gcc 3.4.3

$ diff -u drivers/scsi/ultrastor.s{_,}
--- drivers/scsi/ultrastor.s_   2008-01-16 16:40:01.0 +0100
+++ drivers/scsi/ultrastor.s2008-01-16 16:40:19.0 +0100
@@ -1457,7 +1457,7 @@
je  .L268   #,
 #APP
xorl %ebp,%ebp  # mscp_index
-0: bsfw config+20,%bp  # config.mscp_free, mscp_index
+   0: bsfw config+20,%bp   # config.mscp_free, mscp_index
btr %ebp,config+20  # mscp_index, config.mscp_free
jnc 0b
 #NO_APP
@@ -1726,9 +1726,9 @@
callpanic   #
.size   ultrastor_queuecommand, .-ultrastor_queuecommand
.section.modinfo,a,@progbits
-   .type   __mod_license1184, @object
-   .size   __mod_license1184, 12
-__mod_license1184:
+   .type   __mod_license1191, @object
+   .size   __mod_license1191, 12
+__mod_license1191:
.string license=GPL
.section.rodata.str1.1
 .LC27:


Regards,
Frederik

Signed-off-by: Frederik Deweerdt [EMAIL PROTECTED]

diff --git a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c
index 6d1f0ed..93c5a67 100644
--- a/drivers/scsi/ultrastor.c
+++ b/drivers/scsi/ultrastor.c
@@ -298,9 +298,16 @@ static inline int find_and_clear_bit_16(unsigned long 
*field)
 {
   int rv;
 
-  if (*field == 0) panic(No free mscp);
-  asm(xorl %0,%0\n0:\tbsfw %1,%w0\n\tbtr %0,%1\n\tjnc 0b
-  : =r (rv), =m (*field) : 1 (*field));
+  if (*field == 0)
+panic(No free mscp);
+
+  asm volatile (
+   xorl %0,%0\n\t
+   0: bsfw %1,%w0\n\t
+   btr %0,%1\n\t
+   jnc 0b
+   : =r (rv), =m (*field) :);
+
   return rv;
 }
 

- End forwarded message -

-
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] MAINTAINERS: remove Adam Fritzler, update his email address in other sources

2007-12-17 Thread Adrian Bunk
On Mon, Dec 17, 2007 at 08:28:00PM -0800, Andrew Morton wrote:
...
 I'd suggest that you find out if Adrian is still running the trivial tree
 and if so, patchbomb him.

I do.

Simply Cc [EMAIL PROTECTED] for trivial patches and they might 
magically appear in Linus' tree during the next merge window.  :)

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


scsi/lpfc/lpfc_attr.c: bogus code

2007-12-11 Thread Adrian Bunk
Commit 2e0fef85e098f6794956b8b80b79fbb4cbb7 added the folowing code 
to drivers/scsi/lpfc/lpfc_attr.c that was most likely not intended to be 
dead code:

--  snip  --

...
lpfc_state_show(struct class_device *cdev, char *buf)
{
...
switch (vport-port_state) {
len += snprintf(buf + len, PAGE_SIZE-len,
initializing\n);
break;
...

--  snip  --

Spotted by the GNU C compiler version 3.3.

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


[2.6 patch] scsi/megaraid.c: __devexit annotation

2007-12-11 Thread Adrian Bunk
megaraid_remove_one() can become __devexit.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
b7d71f38d1c1aa66311e862b58f36aa34c888f98 
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 66c6520..765c24d 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -4889,7 +4889,7 @@ __megaraid_shutdown(adapter_t *adapter)
mdelay(1000);
 }
 
-static void
+static void __devexit
 megaraid_remove_one(struct pci_dev *pdev)
 {
struct Scsi_Host *host = pci_get_drvdata(pdev);

-
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 patch] drivers/scsi/advansys.c section fix

2007-12-11 Thread Adrian Bunk
This patch fixes the following section mismatch with CONFIG_HOTPLUG=n:

--  snip  --

...
WARNING: vmlinux.o(.exit.text+0xcf8a): Section mismatch: reference to 
.init.data:_asc_def_iop_base (between 'advansys_isa_remove' and 
'exit_this_scsi_driver')
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
e81cac11f9efe882a89708c298fa6268375b0221 
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 9dd3952..38a1ee2 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -13906,7 +13906,7 @@ static int advansys_release(struct Scsi_Host *shost)
 
 #define ASC_IOADR_TABLE_MAX_IX  11
 
-static PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] __devinitdata = {
+static PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] = {
0x100, 0x0110, 0x120, 0x0130, 0x140, 0x0150, 0x0190,
0x0210, 0x0230, 0x0250, 0x0330
 };

-
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 patch] drivers/scsi/aic94xx/ section fixes

2007-12-11 Thread Adrian Bunk
This patch fixes the following section mismatch with CONFIG_HOTPLUG=n:

--  snip  --

...
WARNING: vmlinux.o(.init.text.20+0xb3061): Section mismatch: reference to 
.exit.text:asd_unmap_ha (between 'asd_pci_probe' and 'ips_insert_device')
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/aic94xx/aic94xx_init.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

c9292b20fa9402084f207e7efa50fcd4150001a4 
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c 
b/drivers/scsi/aic94xx/aic94xx_init.c
index b70d6e7..fc60f80 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -134,7 +134,7 @@ Err:
return err;
 }
 
-static void __devexit asd_unmap_memio(struct asd_ha_struct *asd_ha)
+static void asd_unmap_memio(struct asd_ha_struct *asd_ha)
 {
struct asd_ha_addrspace *io_handle;
 
@@ -171,7 +171,7 @@ static int __devinit asd_map_ioport(struct asd_ha_struct 
*asd_ha)
return err;
 }
 
-static void __devexit asd_unmap_ioport(struct asd_ha_struct *asd_ha)
+static void asd_unmap_ioport(struct asd_ha_struct *asd_ha)
 {
pci_release_region(asd_ha-pcidev, PCI_IOBAR_OFFSET);
 }
@@ -208,7 +208,7 @@ Err:
return err;
 }
 
-static void __devexit asd_unmap_ha(struct asd_ha_struct *asd_ha)
+static void asd_unmap_ha(struct asd_ha_struct *asd_ha)
 {
if (asd_ha-iospace)
asd_unmap_ioport(asd_ha);

-
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 patch] scsi/aic94xx/: cleanups

2007-12-11 Thread Adrian Bunk
On Mon, Nov 05, 2007 at 11:43:35AM -0800, Darrick J. Wong wrote:
 On Mon, Nov 05, 2007 at 06:07:29PM +0100, Adrian Bunk wrote:
  This patch contains the following cleanups:
  - static functions in .c files shouldn't be marked inline
  - make needlessly global code static
  - #if 0 unused code
 
 asd_unpause_lseq can be removed; the other if 0'd functions are debug
 functions and can probably stay.
 
 Otherwise, ack.

Thanks, updated patch below.

 --D

cu
Adrian


--  snip  --


This patch contains the following cleanups:
- static functions in .c files shouldn't be marked inline
- make needlessly global code static
- remove the unused aic94xx_seq.c:asd_unpause_lseq()
- #if 0 other unused code

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/aic94xx/aic94xx_dev.c  |8 +++---
 drivers/scsi/aic94xx/aic94xx_dump.c |   10 +++-
 drivers/scsi/aic94xx/aic94xx_dump.h |9 ---
 drivers/scsi/aic94xx/aic94xx_hwi.c  |   24 ++--
 drivers/scsi/aic94xx/aic94xx_hwi.h  |2 -
 drivers/scsi/aic94xx/aic94xx_init.c |8 +++---
 drivers/scsi/aic94xx/aic94xx_reg.c  |   33 +---
 drivers/scsi/aic94xx/aic94xx_scb.c  |   33 +++-
 drivers/scsi/aic94xx/aic94xx_sds.c  |4 +--
 drivers/scsi/aic94xx/aic94xx_seq.c  |   31 --
 drivers/scsi/aic94xx/aic94xx_seq.h  |4 ---
 drivers/scsi/aic94xx/aic94xx_task.c |   12 +-
 drivers/scsi/aic94xx/aic94xx_tmf.c  |4 +--
 13 files changed, 78 insertions(+), 104 deletions(-)

9f288d19f08353edb833114b5e573d0ed06700b6 
diff --git a/drivers/scsi/aic94xx/aic94xx_dev.c 
b/drivers/scsi/aic94xx/aic94xx_dev.c
index 3dce618..b5aa4b1 100644
--- a/drivers/scsi/aic94xx/aic94xx_dev.c
+++ b/drivers/scsi/aic94xx/aic94xx_dev.c
@@ -35,7 +35,7 @@
 #define SET_DDB(_ddb, _ha) set_bit(_ddb, (_ha)-hw_prof.ddb_bitmap)
 #define CLEAR_DDB(_ddb, _ha) clear_bit(_ddb, (_ha)-hw_prof.ddb_bitmap)
 
-static inline int asd_get_ddb(struct asd_ha_struct *asd_ha)
+static int asd_get_ddb(struct asd_ha_struct *asd_ha)
 {
int ddb, i;
 
@@ -71,7 +71,7 @@ out:
 #define NCQ_DATA_SCB_PTR offsetof(struct asd_ddb_stp_sata_target_port, 
ncq_data_scb_ptr)
 #define ITNL_TIMEOUToffsetof(struct asd_ddb_ssp_smp_target_port, 
itnl_timeout)
 
-static inline void asd_free_ddb(struct asd_ha_struct *asd_ha, int ddb)
+static void asd_free_ddb(struct asd_ha_struct *asd_ha, int ddb)
 {
if (!ddb || ddb = 0x)
return;
@@ -79,7 +79,7 @@ static inline void asd_free_ddb(struct asd_ha_struct *asd_ha, 
int ddb)
CLEAR_DDB(ddb, asd_ha);
 }
 
-static inline void asd_set_ddb_type(struct domain_device *dev)
+static void asd_set_ddb_type(struct domain_device *dev)
 {
struct asd_ha_struct *asd_ha = dev-port-ha-lldd_ha;
int ddb = (int) (unsigned long) dev-lldd_dev;
@@ -109,7 +109,7 @@ static int asd_init_sata_tag_ddb(struct domain_device *dev)
return 0;
 }
 
-static inline int asd_init_sata(struct domain_device *dev)
+static int asd_init_sata(struct domain_device *dev)
 {
struct asd_ha_struct *asd_ha = dev-port-ha-lldd_ha;
int ddb = (int) (unsigned long) dev-lldd_dev;
diff --git a/drivers/scsi/aic94xx/aic94xx_dump.c 
b/drivers/scsi/aic94xx/aic94xx_dump.c
index 6bd8e30..9d637e2 100644
--- a/drivers/scsi/aic94xx/aic94xx_dump.c
+++ b/drivers/scsi/aic94xx/aic94xx_dump.c
@@ -738,6 +738,8 @@ static void asd_dump_lseq_state(struct asd_ha_struct 
*asd_ha, int lseq)
PRINT_LMIP_dword(asd_ha, lseq, DEV_PRES_TIMER_TERM_TS);
 }
 
+#if 0
+
 /**
  * asd_dump_ddb_site -- dump a CSEQ DDB site
  * @asd_ha: pointer to host adapter structure
@@ -880,6 +882,8 @@ void asd_dump_scb_sites(struct asd_ha_struct *asd_ha)
}
 }
 
+#endif  /*  0  */
+
 /**
  * ads_dump_seq_state -- dump CSEQ and LSEQ states
  * @asd_ha: pointer to host adapter structure
@@ -922,7 +926,9 @@ void asd_dump_frame_rcvd(struct asd_phy *phy,
spin_unlock_irqrestore(phy-sas_phy.frame_rcvd_lock, flags);
 }
 
-static inline void asd_dump_scb(struct asd_ascb *ascb, int ind)
+#if 0
+
+static void asd_dump_scb(struct asd_ascb *ascb, int ind)
 {
asd_printk(scb%d: vaddr: 0x%p, dma_handle: 0x%llx, next: 0x%llx, 
   index:%d, opcode:0x%02x\n,
@@ -956,4 +962,6 @@ void asd_dump_scb_list(struct asd_ascb *ascb, int num)
}
 }
 
+#endif  /*  0  */
+
 #endif /* ASD_DEBUG */
diff --git a/drivers/scsi/aic94xx/aic94xx_dump.h 
b/drivers/scsi/aic94xx/aic94xx_dump.h
index 0c388e7..191a753 100644
--- a/drivers/scsi/aic94xx/aic94xx_dump.h
+++ b/drivers/scsi/aic94xx/aic94xx_dump.h
@@ -29,24 +29,15 @@
 
 #ifdef ASD_DEBUG
 
-void asd_dump_ddb_0(struct asd_ha_struct *asd_ha);
-void asd_dump_target_ddb(struct asd_ha_struct *asd_ha, u16 site_no);
-void asd_dump_scb_sites(struct asd_ha_struct *asd_ha);
 void asd_dump_seq_state(struct asd_ha_struct *asd_ha, u8 lseq_mask);
 void asd_dump_frame_rcvd(struct asd_phy *phy,
 struct done_list_struct *dl);
-void

[2.6 patch] scsi/qla2xxx/qla_os.c section fix

2007-11-25 Thread Adrian Bunk
qla2x00_remove_one() mustn't be __devexit since it's called from 
qla2xxx_pci_error_detected().

This patch fixes the following section mismatch:

--  snip  --

...
WARNING: vmlinux.o(.text+0x2a4462): Section mismatch: reference to 
.exit.text:qla2x00_remove_one (between 'qla2xxx_pci_error_detected' and 
'qla2x00_stop_timer')
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/qla2xxx/qla_os.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

764ebbed3c09f765963c20a3a326cf651685a81a 
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index a5bcf1f..8ecc047 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1831,7 +1831,7 @@ probe_out:
return ret;
 }
 
-static void __devexit
+static void
 qla2x00_remove_one(struct pci_dev *pdev)
 {
scsi_qla_host_t *ha;
@@ -2965,7 +2965,7 @@ static struct pci_driver qla2xxx_pci_driver = {
},
.id_table   = qla2xxx_pci_tbl,
.probe  = qla2x00_probe_one,
-   .remove = __devexit_p(qla2x00_remove_one),
+   .remove = qla2x00_remove_one,
.err_handler= qla2xxx_err_handler,
 };
 

-
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 02/23] nsp32_restart_autoscsi(): remove error check

2007-11-22 Thread Adrian Bunk
AFAIR, this was the nsp32_msg() James wanted to keep, and the patch 
should therefore be dropped.

cu
Adrian


On Wed, Nov 21, 2007 at 03:12:15PM -0800, [EMAIL PROTECTED] wrote:
 From: Adrian Bunk [EMAIL PROTECTED]
 
 The Coverity checker noted that we'll anyway Oops later when we ran into
 this condition - and the error check didn't prevent that.
 
 Considering that the error condition shouldn't be possible, and we are
 not able to handle it easily, this patch simply removes the pointless
 error check.
 
 Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Signed-off-by: Andrew Morton [EMAIL PROTECTED]
 ---
 
  drivers/scsi/nsp32.c |4 
  1 file changed, 4 deletions(-)
 
 diff -puN drivers/scsi/nsp32.c~nsp32_restart_autoscsi-remove-error-check 
 drivers/scsi/nsp32.c
 --- a/drivers/scsi/nsp32.c~nsp32_restart_autoscsi-remove-error-check
 +++ a/drivers/scsi/nsp32.c
 @@ -1906,10 +1906,6 @@ static void nsp32_restart_autoscsi(struc
  
   nsp32_dbg(NSP32_DEBUG_RESTART, enter);
  
 - if (data-cur_target == NULL || data-cur_lunt == NULL) {
 - nsp32_msg(KERN_ERR, Target or Lun is invalid);
 - }
 -
   /*
* set SYNC_REG
* Don't set BM_START_ADR before setting this register.
 _

-
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 patch] scsi/aic94xx/: cleanups

2007-11-05 Thread Adrian Bunk
This patch contains the following cleanups:
- static functions in .c files shouldn't be marked inline
- make needlessly global code static
- #if 0 unused code

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/aic94xx/aic94xx_dev.c  |8 +++---
 drivers/scsi/aic94xx/aic94xx_dump.c |   10 +++-
 drivers/scsi/aic94xx/aic94xx_dump.h |9 ---
 drivers/scsi/aic94xx/aic94xx_hwi.c  |   24 ++--
 drivers/scsi/aic94xx/aic94xx_hwi.h  |2 -
 drivers/scsi/aic94xx/aic94xx_init.c |8 +++---
 drivers/scsi/aic94xx/aic94xx_reg.c  |   33 +---
 drivers/scsi/aic94xx/aic94xx_scb.c  |   33 +++-
 drivers/scsi/aic94xx/aic94xx_sds.c  |4 +--
 drivers/scsi/aic94xx/aic94xx_seq.c  |   12 +-
 drivers/scsi/aic94xx/aic94xx_seq.h  |4 ---
 drivers/scsi/aic94xx/aic94xx_task.c |   12 +-
 drivers/scsi/aic94xx/aic94xx_tmf.c  |4 +--
 13 files changed, 80 insertions(+), 83 deletions(-)

7e734a8fb18107e68dd29d3b665c15ceb440a323 
diff --git a/drivers/scsi/aic94xx/aic94xx_dev.c 
b/drivers/scsi/aic94xx/aic94xx_dev.c
index 3dce618..b5aa4b1 100644
--- a/drivers/scsi/aic94xx/aic94xx_dev.c
+++ b/drivers/scsi/aic94xx/aic94xx_dev.c
@@ -35,7 +35,7 @@
 #define SET_DDB(_ddb, _ha) set_bit(_ddb, (_ha)-hw_prof.ddb_bitmap)
 #define CLEAR_DDB(_ddb, _ha) clear_bit(_ddb, (_ha)-hw_prof.ddb_bitmap)
 
-static inline int asd_get_ddb(struct asd_ha_struct *asd_ha)
+static int asd_get_ddb(struct asd_ha_struct *asd_ha)
 {
int ddb, i;
 
@@ -71,7 +71,7 @@ out:
 #define NCQ_DATA_SCB_PTR offsetof(struct asd_ddb_stp_sata_target_port, 
ncq_data_scb_ptr)
 #define ITNL_TIMEOUToffsetof(struct asd_ddb_ssp_smp_target_port, 
itnl_timeout)
 
-static inline void asd_free_ddb(struct asd_ha_struct *asd_ha, int ddb)
+static void asd_free_ddb(struct asd_ha_struct *asd_ha, int ddb)
 {
if (!ddb || ddb = 0x)
return;
@@ -79,7 +79,7 @@ static inline void asd_free_ddb(struct asd_ha_struct *asd_ha, 
int ddb)
CLEAR_DDB(ddb, asd_ha);
 }
 
-static inline void asd_set_ddb_type(struct domain_device *dev)
+static void asd_set_ddb_type(struct domain_device *dev)
 {
struct asd_ha_struct *asd_ha = dev-port-ha-lldd_ha;
int ddb = (int) (unsigned long) dev-lldd_dev;
@@ -109,7 +109,7 @@ static int asd_init_sata_tag_ddb(struct domain_device *dev)
return 0;
 }
 
-static inline int asd_init_sata(struct domain_device *dev)
+static int asd_init_sata(struct domain_device *dev)
 {
struct asd_ha_struct *asd_ha = dev-port-ha-lldd_ha;
int ddb = (int) (unsigned long) dev-lldd_dev;
diff --git a/drivers/scsi/aic94xx/aic94xx_dump.c 
b/drivers/scsi/aic94xx/aic94xx_dump.c
index 6bd8e30..9d637e2 100644
--- a/drivers/scsi/aic94xx/aic94xx_dump.c
+++ b/drivers/scsi/aic94xx/aic94xx_dump.c
@@ -738,6 +738,8 @@ static void asd_dump_lseq_state(struct asd_ha_struct 
*asd_ha, int lseq)
PRINT_LMIP_dword(asd_ha, lseq, DEV_PRES_TIMER_TERM_TS);
 }
 
+#if 0
+
 /**
  * asd_dump_ddb_site -- dump a CSEQ DDB site
  * @asd_ha: pointer to host adapter structure
@@ -880,6 +882,8 @@ void asd_dump_scb_sites(struct asd_ha_struct *asd_ha)
}
 }
 
+#endif  /*  0  */
+
 /**
  * ads_dump_seq_state -- dump CSEQ and LSEQ states
  * @asd_ha: pointer to host adapter structure
@@ -922,7 +926,9 @@ void asd_dump_frame_rcvd(struct asd_phy *phy,
spin_unlock_irqrestore(phy-sas_phy.frame_rcvd_lock, flags);
 }
 
-static inline void asd_dump_scb(struct asd_ascb *ascb, int ind)
+#if 0
+
+static void asd_dump_scb(struct asd_ascb *ascb, int ind)
 {
asd_printk(scb%d: vaddr: 0x%p, dma_handle: 0x%llx, next: 0x%llx, 
   index:%d, opcode:0x%02x\n,
@@ -956,4 +962,6 @@ void asd_dump_scb_list(struct asd_ascb *ascb, int num)
}
 }
 
+#endif  /*  0  */
+
 #endif /* ASD_DEBUG */
diff --git a/drivers/scsi/aic94xx/aic94xx_dump.h 
b/drivers/scsi/aic94xx/aic94xx_dump.h
index 0c388e7..191a753 100644
--- a/drivers/scsi/aic94xx/aic94xx_dump.h
+++ b/drivers/scsi/aic94xx/aic94xx_dump.h
@@ -29,24 +29,15 @@
 
 #ifdef ASD_DEBUG
 
-void asd_dump_ddb_0(struct asd_ha_struct *asd_ha);
-void asd_dump_target_ddb(struct asd_ha_struct *asd_ha, u16 site_no);
-void asd_dump_scb_sites(struct asd_ha_struct *asd_ha);
 void asd_dump_seq_state(struct asd_ha_struct *asd_ha, u8 lseq_mask);
 void asd_dump_frame_rcvd(struct asd_phy *phy,
 struct done_list_struct *dl);
-void asd_dump_scb_list(struct asd_ascb *ascb, int num);
 #else /* ASD_DEBUG */
 
-static inline void asd_dump_ddb_0(struct asd_ha_struct *asd_ha) { }
-static inline void asd_dump_target_ddb(struct asd_ha_struct *asd_ha,
-u16 site_no) { }
-static inline void asd_dump_scb_sites(struct asd_ha_struct *asd_ha) { }
 static inline void asd_dump_seq_state(struct asd_ha_struct *asd_ha,
  u8 lseq_mask) { }
 static inline void asd_dump_frame_rcvd(struct asd_phy *phy

[2.6 patch] scsi/lpfc/: possible cleanups

2007-11-05 Thread Adrian Bunk
This patch contains the following possible cleanups:
- make the following needlessly global functions static:
  - lpfc_els.c: lpfc_register_new_vport()
  - lpfc_els.c: lpfc_issue_els_fdisc()
  - lpfc_els.c: lpfc_issue_fabric_iocb()
  - lpfc_els.c: lpfc_fabric_abort_vport()
  - lpfc_hbadisc.c: lpfc_dev_loss_tmo_handler()
  - lpfc_hbadisc.c: lpfc_mbx_cmpl_clear_la()
  - lpfc_hbadisc.c: lpfc_disc_flush_list()
  - lpfc_hbadisc.c: __lpfc_find_node()
  - lpfc_init.c: lpfc_hb_timeout()
  - lpfc_init.c: lpfc_block_mgmt_io()
  - lpfc_sli.c: __lpfc_sli_release_iocbq()
  - lpfc_sli.c: lpfc_sli_next_hbq_slot()
  - lpfc_sli.c: lpfc_sli_hbqbuf_init_hbqs()
  - lpfc_sli.c: lpfc_sli_hbqbuf_find()
  - lpfc_sli.c: __lpfc_sli_issue_iocb()
- #if 0 the following unused global functions:
  - lpfc_els.c: lpfc_fabric_abort_flogi()
  - lpfc_hbadisc.c: lpfc_find_node()
  - lpfc_hbadisc.c: lpfc_findnode_rpi()
- remove the unused exports

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/lpfc/lpfc_crtn.h|   19 ---
 drivers/scsi/lpfc/lpfc_els.c |   18 ++
 drivers/scsi/lpfc/lpfc_hbadisc.c |   13 +
 drivers/scsi/lpfc/lpfc_init.c|   22 +++---
 drivers/scsi/lpfc/lpfc_sli.c |   10 +-
 drivers/scsi/lpfc/lpfc_vport.c   |3 ---
 6 files changed, 39 insertions(+), 46 deletions(-)

c94edacd40dd5e59cd20072974594e3d2160540c 
diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h
index a599e15..53dd68d 100644
--- a/drivers/scsi/lpfc/lpfc_crtn.h
+++ b/drivers/scsi/lpfc/lpfc_crtn.h
@@ -45,7 +45,6 @@ void lpfc_cleanup_rpis(struct lpfc_vport *vport, int remove);
 int lpfc_linkdown(struct lpfc_hba *);
 void lpfc_mbx_cmpl_read_la(struct lpfc_hba *, LPFC_MBOXQ_t *);
 
-void lpfc_mbx_cmpl_clear_la(struct lpfc_hba *, LPFC_MBOXQ_t *);
 void lpfc_mbx_cmpl_reg_login(struct lpfc_hba *, LPFC_MBOXQ_t *);
 void lpfc_mbx_cmpl_dflt_rpi(struct lpfc_hba *, LPFC_MBOXQ_t *);
 void lpfc_mbx_cmpl_fabric_reg_login(struct lpfc_hba *, LPFC_MBOXQ_t *);
@@ -69,12 +68,10 @@ int  lpfc_nlp_put(struct lpfc_nodelist *);
 struct lpfc_nodelist *lpfc_setup_disc_node(struct lpfc_vport *, uint32_t);
 void lpfc_disc_list_loopmap(struct lpfc_vport *);
 void lpfc_disc_start(struct lpfc_vport *);
-void lpfc_disc_flush_list(struct lpfc_vport *);
 void lpfc_cleanup_discovery_resources(struct lpfc_vport *);
 void lpfc_disc_timeout(unsigned long);
 
 struct lpfc_nodelist *__lpfc_findnode_rpi(struct lpfc_vport *, uint16_t);
-struct lpfc_nodelist *lpfc_findnode_rpi(struct lpfc_vport *, uint16_t);
 
 void lpfc_worker_wake_up(struct lpfc_hba *);
 int lpfc_workq_post_event(struct lpfc_hba *, void *, void *, uint32_t);
@@ -82,8 +79,6 @@ int lpfc_do_work(void *);
 int lpfc_disc_state_machine(struct lpfc_vport *, struct lpfc_nodelist *, void 
*,
uint32_t);
 
-void lpfc_register_new_vport(struct lpfc_hba *, struct lpfc_vport *,
-   struct lpfc_nodelist *);
 void lpfc_do_scr_ns_plogi(struct lpfc_hba *, struct lpfc_vport *);
 int lpfc_check_sparm(struct lpfc_vport *, struct lpfc_nodelist *,
 struct serv_parm *, uint32_t);
@@ -92,7 +87,6 @@ int lpfc_els_chk_latt(struct lpfc_vport *);
 int lpfc_els_abort_flogi(struct lpfc_hba *);
 int lpfc_initial_flogi(struct lpfc_vport *);
 int lpfc_initial_fdisc(struct lpfc_vport *);
-int lpfc_issue_els_fdisc(struct lpfc_vport *, struct lpfc_nodelist *, uint8_t);
 int lpfc_issue_els_plogi(struct lpfc_vport *, uint32_t, uint8_t);
 int lpfc_issue_els_prli(struct lpfc_vport *, struct lpfc_nodelist *, uint8_t);
 int lpfc_issue_els_adisc(struct lpfc_vport *, struct lpfc_nodelist *, uint8_t);
@@ -112,7 +106,6 @@ int lpfc_els_rsp_prli_acc(struct lpfc_vport *, struct 
lpfc_iocbq *,
 void lpfc_cancel_retry_delay_tmo(struct lpfc_vport *, struct lpfc_nodelist *);
 void lpfc_els_retry_delay(unsigned long);
 void lpfc_els_retry_delay_handler(struct lpfc_nodelist *);
-void lpfc_dev_loss_tmo_handler(struct lpfc_nodelist *);
 void lpfc_els_unsol_event(struct lpfc_hba *, struct lpfc_sli_ring *,
  struct lpfc_iocbq *);
 int lpfc_els_handle_rscn(struct lpfc_vport *);
@@ -124,7 +117,6 @@ int lpfc_els_disc_adisc(struct lpfc_vport *);
 int lpfc_els_disc_plogi(struct lpfc_vport *);
 void lpfc_els_timeout(unsigned long);
 void lpfc_els_timeout_handler(struct lpfc_vport *);
-void lpfc_hb_timeout(unsigned long);
 void lpfc_hb_timeout_handler(struct lpfc_hba *);
 
 void lpfc_ct_unsol_event(struct lpfc_hba *, struct lpfc_sli_ring *,
@@ -142,7 +134,6 @@ void lpfc_hba_init(struct lpfc_hba *, uint32_t *);
 int lpfc_post_buffer(struct lpfc_hba *, struct lpfc_sli_ring *, int, int);
 void lpfc_decode_firmware_rev(struct lpfc_hba *, char *, int);
 int lpfc_online(struct lpfc_hba *);
-void lpfc_block_mgmt_io(struct lpfc_hba *);
 void lpfc_unblock_mgmt_io(struct lpfc_hba *);
 void lpfc_offline_prep(struct lpfc_hba *);
 void lpfc_offline(struct lpfc_hba *);
@@ -165,7 +156,6 @@ int

[2.6 patch] scsi/qla2xxx/: possible cleanups

2007-11-05 Thread Adrian Bunk
This patch contains the following possible cleanups:
- make the following needlessly global code static:
  - qla_attr.c: qla24xx_vport_delete()
  - qla_attr.c: qla24xx_vport_disable()
  - qla_mid.c: qla24xx_allocate_vp_id()
  - qla_mid.c: qla24xx_find_vhost_by_name()
  - qla_mid.c: qla2x00_do_dpc_vp()
  - qla_os.c: struct qla2x00_driver_template
  - qla_os.c: qla2x00_stop_timer()
  - qla_os.c: qla2x00_mem_alloc()
  - qla_os.c: qla2x00_mem_free()
  - qla_sup.c: qla2x00_lock_nvram_access()
  - qla_sup.c: qla2x00_unlock_nvram_access()
  - qla_sup.c: qla2x00_get_nvram_word()
  - qla_sup.c: qla2x00_write_nvram_word()
- #if 0 the following unused global functions:
  - qla_dbg.c: qla2x00_dump_pkt()
  - qla_mbx.c: qla2x00_system_error()
  - qla_mbx.c: qla2x00_get_serdes_params()
  - qla_mbx.c: qla2x00_get_idma_speed()
  - qla_mbx.c: qla24xx_get_vp_database()
  - qla_mbx.c: qla24xx_get_vp_entry()
- qla_os.c: remove some unneeded function prototypes

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/qla2xxx/qla_attr.c |6 +++---
 drivers/scsi/qla2xxx/qla_dbg.c  |2 ++
 drivers/scsi/qla2xxx/qla_gbl.h  |   25 -
 drivers/scsi/qla2xxx/qla_mbx.c  |   10 ++
 drivers/scsi/qla2xxx/qla_mid.c  |6 +++---
 drivers/scsi/qla2xxx/qla_os.c   |   20 ++--
 drivers/scsi/qla2xxx/qla_sup.c  |8 
 7 files changed, 28 insertions(+), 49 deletions(-)

2aa8a08454693ac86647fef919177da8fb5c5596 
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index fb388b8..cf822b6 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -9,7 +9,7 @@
 #include linux/kthread.h
 #include linux/vmalloc.h
 
-int qla24xx_vport_disable(struct fc_vport *, bool);
+static int qla24xx_vport_disable(struct fc_vport *, bool);
 
 /* SYSFS attributes - 
*/
 
@@ -1113,7 +1113,7 @@ vport_create_failed_2:
return FC_VPORT_FAILED;
 }
 
-int
+static int
 qla24xx_vport_delete(struct fc_vport *fc_vport)
 {
scsi_qla_host_t *ha = shost_priv(fc_vport-shost);
@@ -1146,7 +1146,7 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
return 0;
 }
 
-int
+static int
 qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable)
 {
scsi_qla_host_t *vha = fc_vport-dd_data;
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index eaa04da..72e6202 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -1428,6 +1428,7 @@ qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd)
printk(  sp flags=0x%x\n, sp-flags);
 }
 
+#if 0
 void
 qla2x00_dump_pkt(void *pkt)
 {
@@ -1442,6 +1443,7 @@ qla2x00_dump_pkt(void *pkt)
}
printk(\n);
 }
+#endif  /*  0  */
 
 #if defined(QL_DEBUG_ROUTINES)
 /*
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index 09cb2a9..8a5d258 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -68,30 +68,20 @@ extern int num_hosts;
 /*
  * Global Functions in qla_mid.c source file.
  */
-extern struct scsi_host_template qla2x00_driver_template;
 extern struct scsi_host_template qla24xx_driver_template;
 extern struct scsi_transport_template *qla2xxx_transport_vport_template;
-extern uint8_t qla2x00_mem_alloc(scsi_qla_host_t *);
 extern void qla2x00_timer(scsi_qla_host_t *);
 extern void qla2x00_start_timer(scsi_qla_host_t *, void *, unsigned long);
-extern void qla2x00_stop_timer(scsi_qla_host_t *);
-extern uint32_t qla24xx_allocate_vp_id(scsi_qla_host_t *);
 extern void qla24xx_deallocate_vp_id(scsi_qla_host_t *);
 extern int qla24xx_disable_vp (scsi_qla_host_t *);
 extern int qla24xx_enable_vp (scsi_qla_host_t *);
-extern void qla2x00_mem_free(scsi_qla_host_t *);
 extern int qla24xx_control_vp(scsi_qla_host_t *, int );
 extern int qla24xx_modify_vp_config(scsi_qla_host_t *);
 extern int qla2x00_send_change_request(scsi_qla_host_t *, uint16_t, uint16_t);
 extern void qla2x00_vp_stop_timer(scsi_qla_host_t *);
 extern int qla24xx_configure_vhba (scsi_qla_host_t *);
-extern int qla24xx_get_vp_entry(scsi_qla_host_t *, uint16_t, int);
-extern int qla24xx_get_vp_database(scsi_qla_host_t *, uint16_t);
-extern int qla2x00_do_dpc_vp(scsi_qla_host_t *);
 extern void qla24xx_report_id_acquisition(scsi_qla_host_t *,
 struct vp_rpt_id_entry_24xx *);
-extern scsi_qla_host_t * qla24xx_find_vhost_by_name(scsi_qla_host_t *,
-uint8_t *);
 extern void qla2x00_do_dpc_all_vps(scsi_qla_host_t *);
 extern int qla24xx_vport_create_req_sanity_check(struct fc_vport *);
 extern scsi_qla_host_t * qla24xx_create_vhost(struct fc_vport *);
@@ -113,7 +103,6 @@ extern void qla2xxx_wake_dpc(scsi_qla_host_t *);
 extern void qla2x00_alert_all_vps(scsi_qla_host_t *, uint16_t *);
 extern void qla2x00_async_event(scsi_qla_host_t *, uint16_t *);
 extern void qla2x00_vp_abort_isp(scsi_qla_host_t *);
-extern int qla24xx_vport_delete(struct fc_vport

[2.6 patch] scsi/seagate.c: remove dead code

2007-10-28 Thread Adrian Bunk
This patch removes obviously dead code.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/seagate.c |2 --
 1 file changed, 2 deletions(-)

c0807bbefb65ef679b7d2ec13d14c35f2e927404 
diff --git a/drivers/scsi/seagate.c b/drivers/scsi/seagate.c
index b113244..2d31ed4 100644
--- a/drivers/scsi/seagate.c
+++ b/drivers/scsi/seagate.c
@@ -1437,17 +1437,15 @@ connect_loop:
break;
 #ifdef LINKED
case LINKED_WRONG:
WRITE_DATA (ABORT);
linked_connected = 0;
reselect = CAN_RECONNECT;
goto connect_loop;
-   DPRINTK (PHASE_MSGOUT | DEBUG_LINKED, 
scsi%d : sent ABORT message to cancel incorrect I_T_L nexus.\n, hostno);
 #endif /* LINKED */
-   DPRINTK (DEBUG_LINKED, correct\n);
default:
WRITE_DATA (NOP);
printk(scsi%d : target %d requested 
MSGOUT, sent NOP message.\n, hostno, target);
}
break;
 
case REQ_MSGIN:

-
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 patch] scsi/advansys.c: make 3 functions static

2007-10-24 Thread Adrian Bunk
This patch makes three needlessly global functions static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/advansys.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

ad7c16573cd33555f4136c50fa35d1fb2c3669ca 
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 9dd3952..e316ff2 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -12261,7 +12261,7 @@ static ushort __devinit AdvReadEEPWord(AdvPortAddr 
iop_base, int eep_word_addr)
 /*
  * Write the EEPROM from 'cfg_buf'.
  */
-void __devinit
+static void __devinit
 AdvSet3550EEPConfig(AdvPortAddr iop_base, ADVEEP_3550_CONFIG *cfg_buf)
 {
ushort *wbuf;
@@ -12328,7 +12328,7 @@ AdvSet3550EEPConfig(AdvPortAddr iop_base, 
ADVEEP_3550_CONFIG *cfg_buf)
 /*
  * Write the EEPROM from 'cfg_buf'.
  */
-void __devinit
+static void __devinit
 AdvSet38C0800EEPConfig(AdvPortAddr iop_base, ADVEEP_38C0800_CONFIG *cfg_buf)
 {
ushort *wbuf;
@@ -12395,7 +12395,7 @@ AdvSet38C0800EEPConfig(AdvPortAddr iop_base, 
ADVEEP_38C0800_CONFIG *cfg_buf)
 /*
  * Write the EEPROM from 'cfg_buf'.
  */
-void __devinit
+static void __devinit
 AdvSet38C1600EEPConfig(AdvPortAddr iop_base, ADVEEP_38C1600_CONFIG *cfg_buf)
 {
ushort *wbuf;

-
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


[RFC: 2.6 patch] nsp32_restart_autoscsi(): remove error check

2007-10-24 Thread Adrian Bunk
The Coverity checker noted that we'll anyway Oops later when we ran into 
this condition - and the error check didn't prevent that.

Considering that the error condition shouldn't be possible, and we are 
not able to handle it easily, this patch simply removes the pointless 
error check.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch has been sent on:
- 23 Jul 2007

 drivers/scsi/nsp32.c |4 
 1 file changed, 4 deletions(-)

--- linux-2.6.22-rc6-mm1/drivers/scsi/nsp32.c.old   2007-07-23 
19:38:58.0 +0200
+++ linux-2.6.22-rc6-mm1/drivers/scsi/nsp32.c   2007-07-23 20:17:14.0 
+0200
@@ -1888,44 +1888,40 @@ static void nsp32_msgout_occur(struct sc
 
data-msgout_len = 0;
 
nsp32_dbg(NSP32_DEBUG_MSGOUTOCCUR, exit);
 }
 
 /*
  * Restart AutoSCSI
  *
  * Note: Restarting AutoSCSI needs set:
  * SYNC_REG, ACK_WIDTH, SGT_ADR, TRANSFER_CONTROL
  */
 static void nsp32_restart_autoscsi(struct scsi_cmnd *SCpnt, unsigned short 
command)
 {
nsp32_hw_data *data = (nsp32_hw_data *)SCpnt-device-host-hostdata;
unsigned int   base = data-BaseAddress;
unsigned short transfer = 0;
 
nsp32_dbg(NSP32_DEBUG_RESTART, enter);
 
-   if (data-cur_target == NULL || data-cur_lunt == NULL) {
-   nsp32_msg(KERN_ERR, Target or Lun is invalid);
-   }
-
/*
 * set SYNC_REG
 * Don't set BM_START_ADR before setting this register.
 */
nsp32_write1(base, SYNC_REG, data-cur_target-syncreg);
 
/*
 * set ACKWIDTH
 */
nsp32_write1(base, ACK_WIDTH, data-cur_target-ackwidth);
 
/*
 * set SREQ hazard killer sampling rate
 */
nsp32_write1(base, SREQ_SMPL_RATE, data-cur_target-sample_reg);
 
/*
 * set SGT ADDR (physical address)
 */
nsp32_write4(base, SGT_ADR, data-cur_lunt-sglun_paddr);

-
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 patch] cleanup after APUS removal

2007-10-24 Thread Adrian Bunk
After the APUS removal, some code can be removed.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 arch/m68k/amiga/chipram.c   |2 
 drivers/ide/ide-probe.c |8 +--
 drivers/isdn/hisax/avm_pci.c|8 ---
 drivers/scsi/a2091.c|3 -
 drivers/scsi/a3000.c|3 -
 drivers/scsi/gvp11.c|3 -
 drivers/scsi/oktagon_esp.c  |2 
 drivers/scsi/oktagon_io.S   |   72 
 drivers/video/console/fbcon.c   |2 
 drivers/video/console/fonts.c   |4 -
 include/asm-m68k/pgtable.h  |2 
 sound/oss/dmasound/Kconfig  |2 
 sound/oss/dmasound/dmasound_paula.c |4 -
 13 files changed, 12 insertions(+), 103 deletions(-)

557134975b5c1098cd42a6295670723ecfb35b57 
diff --git a/arch/m68k/amiga/chipram.c b/arch/m68k/amiga/chipram.c
index fa015d8..75d4626 100644
--- a/arch/m68k/amiga/chipram.c
+++ b/arch/m68k/amiga/chipram.c
@@ -29,12 +29,10 @@ void __init amiga_chip_init(void)
 if (!AMIGAHW_PRESENT(CHIP_RAM))
return;
 
-#ifndef CONFIG_APUS_FAST_EXCEPT
 /*
  *  Remove the first 4 pages where PPC exception handlers will be located
  */
 amiga_chip_size -= 0x4000;
-#endif
 chipram_res.end = amiga_chip_size-1;
 request_resource(iomem_resource, chipram_res);
 
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 6a6f2e0..1664e2d 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1062,9 +1062,9 @@ static int init_irq (ide_hwif_t *hwif)
 */
if (!match || match-irq != hwif-irq) {
int sa = IRQF_DISABLED;
-#if defined(__mc68000__) || defined(CONFIG_APUS)
+#if defined(__mc68000__)
sa = IRQF_SHARED;
-#endif /* __mc68000__ || CONFIG_APUS */
+#endif /* __mc68000__ */
 
if (IDE_CHIPSET_IS_PCI(hwif-chipset)) {
sa = IRQF_SHARED;
@@ -1107,7 +1107,7 @@ static int init_irq (ide_hwif_t *hwif)
spin_unlock_irq(ide_lock);
}
 
-#if !defined(__mc68000__)  !defined(CONFIG_APUS)
+#if !defined(__mc68000__)
printk(%s at 0x%03lx-0x%03lx,0x%03lx on irq %d, hwif-name,
hwif-io_ports[IDE_DATA_OFFSET],
hwif-io_ports[IDE_DATA_OFFSET]+7,
@@ -1115,7 +1115,7 @@ static int init_irq (ide_hwif_t *hwif)
 #else
printk(%s at 0x%08lx on irq %d, hwif-name,
hwif-io_ports[IDE_DATA_OFFSET], hwif-irq);
-#endif /* __mc68000__  CONFIG_APUS */
+#endif /* __mc68000__ */
if (match)
printk( (%sed with %s),
hwif-sharing_irq ? shar : serializ, match-name);
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c
index f8b7978..be55a26 100644
--- a/drivers/isdn/hisax/avm_pci.c
+++ b/drivers/isdn/hisax/avm_pci.c
@@ -263,11 +263,7 @@ hdlc_empty_fifo(struct BCState *bcs, int count)
outl(idx, cs-hw.avm.cfg_reg + 4);
while (cnt  count) {
 #ifdef __powerpc__
-#ifdef CONFIG_APUS
-   *ptr++ = in_le32((unsigned *)(cs-hw.avm.isac 
+_IO_BASE));
-#else
*ptr++ = in_be32((unsigned *)(cs-hw.avm.isac 
+_IO_BASE));
-#endif /* CONFIG_APUS */
 #else
*ptr++ = inl(cs-hw.avm.isac);
 #endif /* __powerpc__ */
@@ -328,11 +324,7 @@ hdlc_fill_fifo(struct BCState *bcs)
if (cs-subtyp == AVM_FRITZ_PCI) {
while (cntcount) {
 #ifdef __powerpc__
-#ifdef CONFIG_APUS
-   out_le32((unsigned *)(cs-hw.avm.isac +_IO_BASE), 
*ptr++);
-#else
out_be32((unsigned *)(cs-hw.avm.isac +_IO_BASE), 
*ptr++);
-#endif /* CONFIG_APUS */
 #else
outl(*ptr++, cs-hw.avm.isac);
 #endif /* __powerpc__ */
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c
index b7c5385..0d4c593 100644
--- a/drivers/scsi/a2091.c
+++ b/drivers/scsi/a2091.c
@@ -46,8 +46,7 @@ static int dma_setup(struct scsi_cmnd *cmd, int dir_in)
 struct Scsi_Host *instance = cmd-device-host;
 
 /* don't allow DMA if the physical address is bad */
-if (addr  A2091_XFER_MASK ||
-   (!dir_in  mm_end_of_chunk (addr, cmd-SCp.this_residual)))
+if (addr  A2091_XFER_MASK)
 {
HDATA(instance)-dma_bounce_len = (cmd-SCp.this_residual + 511)
 ~0x1ff;
diff --git a/drivers/scsi/a3000.c b/drivers/scsi/a3000.c
index 796f1c4..b3a6c58 100644
--- a/drivers/scsi/a3000.c
+++ b/drivers/scsi/a3000.c
@@ -54,8 +54,7 @@ static int dma_setup(struct scsi_cmnd *cmd, int dir_in)
  * end of a physical memory chunk, then allocate a bounce
  * buffer
  */
-if (addr  A3000_XFER_MASK ||
-   (!dir_in  mm_end_of_chunk (addr, cmd-SCp.this_residual)))
+if (addr  A3000_XFER_MASK)
 {
HDATA(a3000_host)-dma_bounce_len = (cmd-SCp.this_residual + 511)
 ~0x1ff;
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c
index 37741e9..91f8522 100644
--- a/drivers/scsi

[2.6 patch] 53c7xx removal fallout

2007-10-24 Thread Adrian Bunk
This patch does some additional cleanups after the 53c7xx removal.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 Documentation/dontdiff|2 
 Documentation/m68k/kernel-options.txt |   60 --
 Documentation/scsi/00-INDEX   |2 
 Documentation/scsi/ncr53c7xx.txt  |   40 -
 drivers/scsi/.gitignore   |2 
 5 files changed, 106 deletions(-)

cc96ec601a55800f9a6bce6e208c7ff1e2f618fd 
diff --git a/Documentation/dontdiff b/Documentation/dontdiff
index f2d658a..c09a96b 100644
--- a/Documentation/dontdiff
+++ b/Documentation/dontdiff
@@ -46,8 +46,6 @@
 .mailmap
 .mm
 53c700_d.h
-53c7xx_d.h
-53c7xx_u.h
 53c8xx_d.h*
 BitKeeper
 COPYING
diff --git a/Documentation/m68k/kernel-options.txt 
b/Documentation/m68k/kernel-options.txt
index 248589e..c93bed6 100644
--- a/Documentation/m68k/kernel-options.txt
+++ b/Documentation/m68k/kernel-options.txt
@@ -867,66 +867,6 @@ controller and should be autodetected by the driver. An 
example is the
 24 bit region which is specified by a mask of 0x00fe.
 
 
-5.5) 53c7xx=
-
-
-Syntax: 53c7xx=sub-options...
-
-These options affect the A4000T, A4091, WarpEngine, Blizzard 603e+,
-and GForce 040/060 SCSI controllers on the Amiga, as well as the
-builtin MVME 16x SCSI controller.
-
-The sub-options is a comma-separated list of the sub-options listed
-below.
-
-5.5.1) nosync
--
-
-Syntax: nosync:0
-
-  Disables sync negotiation for all devices.  Any value after the
-  colon is acceptable (and has the same effect).
-
-5.5.2) noasync
---
-
-[OBSOLETE, REMOVED]
-
-5.5.3) nodisconnect

-
-Syntax: nodisconnect:0
-
-  Disables SCSI disconnects.  Any value after the colon is acceptable
-  (and has the same effect).
-
-5.5.4) validids

-
-Syntax: validids:0xNN
-
-  Specify which SCSI ids the driver should pay attention to.  This is
-  a bitmask (i.e. to only pay attention to ID#4, you'd use 0x10).
-  Default is 0x7f (devices 0-6).
-
-5.5.5) opthi
-5.5.6) optlo
-
-
-Syntax: opthi:M,optlo:N
-
-  Specify options for hostdata-options.  The acceptable definitions
-  are listed in drivers/scsi/53c7xx.h; the 32 high bits should be in
-  opthi and the 32 low bits in optlo.  They must be specified in the
-  order opthi=M,optlo=N.
-
-5.5.7) next

-
-  No argument. Used to separate blocks of keywords when there's more
-  than one 53c7xx host adapter in the system.
-
-
 /* Local Variables: */
 /* mode: text   */
 /* End: */
diff --git a/Documentation/scsi/00-INDEX b/Documentation/scsi/00-INDEX
index aa1f7e9..c2e18e1 100644
--- a/Documentation/scsi/00-INDEX
+++ b/Documentation/scsi/00-INDEX
@@ -64,8 +64,6 @@ lpfc.txt
- LPFC driver release notes
 megaraid.txt
- Common Management Module, shared code handling ioctls for LSI drivers
-ncr53c7xx.txt
-   - info on driver for NCR53c7xx based adapters
 ncr53c8xx.txt
- info on driver for NCR53c8xx based adapters
 osst.txt
diff --git a/Documentation/scsi/ncr53c7xx.txt b/Documentation/scsi/ncr53c7xx.txt
deleted file mode 100644
index 91e9552..000
--- a/Documentation/scsi/ncr53c7xx.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-README for WarpEngine/A4000T/A4091 SCSI kernels.
-
-Use the following options to disable options in the SCSI driver.
-
-Using amiboot for example.
-
-To disable Synchronous Negotiation
-
-   amiboot -k kernel 53c7xx=nosync:0   
-
-To disable Disconnection
-   
-   amiboot -k kernel 53c7xx=nodisconnect:0
-
-To disable certain SCSI devices...
-
-   amiboot -k kernel 53c7xx=validids:0x3F
-
-   this allows only device ID's 0,1,2,3,4 and 5 for linux to handle.
-   (this is a bitmasked field - i.e. each bit represents a SCSI ID)
-
-These commands work on a per controller basis and use the option 'next' to
-move to the next controller in the system.
-
-e.g.
-   amiboot -k kernel 53c7xx=nodisconnect:0,next,nosync:0
-
-   this uses No Disconnection on the first controller and Asynchronous
-   SCSI on the second controller.
-
-Known Issues:
-
-Two devices are known not to function with the default settings of using
-synchronous SCSI. These are the Archive Viper 150 Tape Drive and the 
-SyQuest SQ555 removeable hard drive. When using these devices on a controller
-use the 'nosync:0' option.
-
-Please try these options and post any problems/successes to me.
-
-Alan Hourihane [EMAIL PROTECTED]
diff --git a/drivers/scsi/.gitignore b/drivers/scsi/.gitignore
index b385af3..c89ae9a 100644
--- a/drivers/scsi/.gitignore
+++ b/drivers/scsi/.gitignore
@@ -1,3 +1 @@
 53c700_d.h
-53c7xx_d.h
-53c7xx_u.h

-
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: [RFC: 2.6 patch] nsp32_restart_autoscsi(): remove error check

2007-10-24 Thread Adrian Bunk
On Wed, Oct 24, 2007 at 12:41:12PM -0400, James Bottomley wrote:
 On Wed, 2007-10-24 at 18:25 +0200, Adrian Bunk wrote:
  The Coverity checker noted that we'll anyway Oops later when we ran into 
  this condition - and the error check didn't prevent that.
  
  Considering that the error condition shouldn't be possible, and we are 
  not able to handle it easily, this patch simply removes the pointless 
  error check.
 
 This is the one where I said I don't like the fact that you're removing
 the explanatory message that's printed before we crash.  if you want to
 shut coverity up and stop sending the patch, I'm happy adding a BUG();
 after the nsp32_msg().

Sorry, I missed your answer when resending since it was in a different 
thread.

I'm still not convinced we really need the nsp32_msg() here but you are 
the maintainer and it's not a big deal anyway

A BUG() would IMHO be similarly pointless as the nsp32_msg() at this 
point and there's no value in changing code only for the sake of the 
Coverity checker.

 James

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


[2.6 patch] scsi/lpfc/lpfc_debugfs.c: fix typo

2007-10-18 Thread Adrian Bunk
This patch fixes a typo introduced by
commit bbfbbbc1182f8b44c8cc4c99f4a3f3a512149022.

It wasn't a compile error since CONFIG_LPFC_DEBUG_FS is not (yet?) 
available as an option.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
74e14a2a4ed066aa8fedd557a6768fdfec5eb883 
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index 149fdd2..d6a98bc 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -901,7 +901,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
}
}
 
-   vport-disc_trc = kmzlloc(
+   vport-disc_trc = kzalloc(
(sizeof(struct lpfc_debugfs_trc) * lpfc_debugfs_max_disc_trc),
GFP_KERNEL);
 

-
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: Scsi on sparc build break in 2.6.23.

2007-10-13 Thread Adrian Bunk
On Sat, Oct 13, 2007 at 02:09:35PM -0500, Rob Landley wrote:
 On Thursday 11 October 2007 6:56:59 pm Adrian Bunk wrote:
  On Thu, Oct 11, 2007 at 05:37:30PM -0500, Rob Landley wrote:
   On Thursday 11 October 2007 10:21:49 am Adrian Bunk wrote:
I assume you have the full .config in your build directory, and could
have taken it from there?
  
   Actually I don't.  (The extracted source tree is in a temporary directory
   which the script deletes afterwards unless I tell it not to.  I just
   followed my own instructions to create the .config and attach it, but I
   see that James Bottomley already diagnosed it and you came up with a
   patch.  Off to try it...)
 
  I was able to follow your instructions for generating it.
 
  But I hope you got my point that it's much easier to debug such issues
  when you generate the .config yourself and attach it when sending the
  bug report.
 
 *shrug*  I find miniconfig much easier to read because I can see what the 50 
 or so intentional options are, not just the 1000 or so background options set 
 to various default values.

The .config is the canonical format everyone is used to.

It also has advantages like a defined order of the options.

And it is actually an advantage that you see what the other options are 
set to (e.g. in this case your miniconfig did not show the value of 
CONFIG_HOTPLUG which was the most important option for understanding the 
bug) - it doesn't matter whether you {dis,en}abled it intentionally, 
all that matter is it's value.

There might be use cases where a miniconfig is better, but for debugging 
compile errors a full .config is much better.

 Rob

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: Scsi on sparc build break in 2.6.23.

2007-10-11 Thread Adrian Bunk
On Thu, Oct 11, 2007 at 05:52:48AM -0500, Rob Landley wrote:
 CONFIG_SCSI_SUNESP=y breaks the build in 2.6.23:
 
   LD  vmlinux
 `scsi_esp_unregister' referenced in section `__ksymtab' of 
 drivers/built-in.o: 
 defined in discarded section `.exit.text' of drivers/built-in.o
 make: *** [vmlinux] Error 1
 
 Do you need my full .config to reproduce this?

Please always attach the .config when reporting errors.
The few bytes don't matter and it often saves some time.

I have an idea regarding what might be going wrong in this case,
but it would cost me additional time to look at it because you didn't 
send your .config.

 Rob

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


[2.6 patch] esp_scsi.c: remove __dev{init,exit}

2007-10-11 Thread Adrian Bunk
On Thu, Oct 11, 2007 at 08:30:38AM -0500, James Bottomley wrote:
 On Thu, 2007-10-11 at 08:17 -0500, Rob Landley wrote:
  On Thursday 11 October 2007 6:05:55 am Adrian Bunk wrote:
   On Thu, Oct 11, 2007 at 05:52:48AM -0500, Rob Landley wrote:
CONFIG_SCSI_SUNESP=y breaks the build in 2.6.23:
   
  LD  vmlinux
`scsi_esp_unregister' referenced in section `__ksymtab' of
drivers/built-in.o: defined in discarded section `.exit.text' of
drivers/built-in.o
make: *** [vmlinux] Error 1
   
Do you need my full .config to reproduce this?
  
   Please always attach the .config when reporting errors.
   The few bytes don't matter and it often saves some time.
  
   I have an idea regarding what might be going wrong in this case,
   but it would cost me additional time to look at it because you didn't
   send your .config.
  
  *shrug*  That's why I asked.
  
  The reason I hesitated is I use miniconfig files rather than big .config 
  files, and some people get confused by that.  Drop the attached 
  miniconfig-linux in the kernel source directory and go:
make ARCH=sparc allnoconfig KCONFIG_ALLCONFIG=miniconfig-linux
  
  That expands it to a big .config file, and from there make ARCH=sparc 
  CROSS_COMPILE=sparc- to reproduce the problem.  Assuming you have a sparc 
  cross-compiler lying around.
  
  Disable CONFIG_SCSI_SUNESP and it builds to the end, (and the result boots 
  but 
  won't mount the root filesystem, which is sort of expected).
 
 This is a very subtle error.  You're building without hotplug, which
 causes __devexit to become __exit, so scsi_esp_unregister is placed in
 the discard section of vmlinux.  Unfortunately, the EXPORT_SYMBOL causes
 it to be referenced from the symbol export table.
 
 The fix is probably just to remove the __devexit tag from the function
 rather than trying to work out how to make the export symbol conditional
 on the symbol not being discarded.

You can't make it conditional on that since a built-in esp_scsi could 
have modular users.

scsi_esp_register() is also buggy since it's impossible that the 
EXPORT_SYMBOL(scsi_esp_register) works in the CONFIG_HOTPLUG=n case when 
it's __devinit - it will always Oops.

Having anything exported __{,dev}{init,exit} is always very likely to be 
buggy.

Patch below.

 James

cu
Adrian


--  snip  --


Since scsi_esp_{,un}register() are EXPORT_SYMBOL'ed, these functions
(and the functions they use) can't be __dev{init,exit}.

Based on a bug report by Rob Landley.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/esp_scsi.c |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

--- linux-2.6.23/drivers/scsi/esp_scsi.c.old2007-10-11 17:29:50.0 
+0200
+++ linux-2.6.23/drivers/scsi/esp_scsi.c2007-10-11 17:31:25.0 
+0200
@@ -2138,7 +2138,7 @@
 }
 EXPORT_SYMBOL(scsi_esp_intr);
 
-static void __devinit esp_get_revision(struct esp *esp)
+static void esp_get_revision(struct esp *esp)
 {
u8 val;
 
@@ -2187,7 +2187,7 @@
}
 }
 
-static void __devinit esp_init_swstate(struct esp *esp)
+static void esp_init_swstate(struct esp *esp)
 {
int i;
 
@@ -2233,7 +2233,7 @@
esp_read8(ESP_INTRPT);
 }
 
-static void __devinit esp_set_clock_params(struct esp *esp)
+static void esp_set_clock_params(struct esp *esp)
 {
int fmhz;
u8 ccf;
@@ -2306,7 +2306,7 @@
 
 static struct scsi_transport_template *esp_transport_template;
 
-int __devinit scsi_esp_register(struct esp *esp, struct device *dev)
+int scsi_esp_register(struct esp *esp, struct device *dev)
 {
static int instance;
int err;
@@ -2346,7 +2346,7 @@
 }
 EXPORT_SYMBOL(scsi_esp_register);
 
-void __devexit scsi_esp_unregister(struct esp *esp)
+void scsi_esp_unregister(struct esp *esp)
 {
scsi_remove_host(esp-host);
 }

-
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: Scsi on sparc build break in 2.6.23.

2007-10-11 Thread Adrian Bunk
On Thu, Oct 11, 2007 at 05:37:30PM -0500, Rob Landley wrote:
 On Thursday 11 October 2007 10:21:49 am Adrian Bunk wrote:
  I assume you have the full .config in your build directory, and could
  have taken it from there?
 
 Actually I don't.  (The extracted source tree is in a temporary directory 
 which the script deletes afterwards unless I tell it not to.  I just followed 
 my own instructions to create the .config and attach it, but I see that James 
 Bottomley already diagnosed it and you came up with a patch.  Off to try 
 it...)

I was able to follow your instructions for generating it.

But I hope you got my point that it's much easier to debug such issues 
when you generate the .config yourself and attach it when sending the 
bug report.

 Rob

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: 2.6.23-rc9 boot failure (megaraid?)

2007-10-04 Thread Adrian Bunk
On Thu, Oct 04, 2007 at 09:28:34AM +0200, Jens Axboe wrote:
...
 Tomo, this is the patch I added.

Please excuse my comment in case this was already clear:

You are aware that this bug is a regression in 2.6.23-rc and the patch 
should therefore go to Linus ASAP and not after the release of 2.6.23?

 Jens Axboe

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: 2.6.23-rc9 boot failure (megaraid?)

2007-10-02 Thread Adrian Bunk
Cc's added, the complete bug report is at
  http://lkml.org/lkml/2007/10/2/243

On Tue, Oct 02, 2007 at 12:48:26PM -0400, Burton Windle wrote:
 2.6.23-rc9 fails to boot for me; 2.6.22.9 works fine.

 System is a Dell Poweredge with PERC 2/DC with RAID1 volume.
...

Thanks for your report.

Diff'ing the dmesg's shows:

--  snip  --

 scsi0: scanning scsi channel 4 [P0] for physical devices.
 scsi0: scanning scsi channel 5 [P1] for physical devices.
 st: Version 20070203, fixed bufsize 32768, s/g segs 256
-sd 0:0:0:0: [sda] 17547264 512-byte hardware sectors (8984 MB)
+sd 0:0:0:0: [sda] Sector size 0 reported, assuming 512.
+sd 0:0:0:0: [sda] 1 512-byte hardware sectors (0 MB)
 sd 0:0:0:0: [sda] Write Protect is off
 sd 0:0:0:0: [sda] Asking for cache data failed
 sd 0:0:0:0: [sda] Assuming drive cache: write through
-sd 0:0:0:0: [sda] 17547264 512-byte hardware sectors (8984 MB)
+sd 0:0:0:0: [sda] Sector size 0 reported, assuming 512.
+sd 0:0:0:0: [sda] 1 512-byte hardware sectors (0 MB)
 sd 0:0:0:0: [sda] Write Protect is off
 sd 0:0:0:0: [sda] Asking for cache data failed
 sd 0:0:0:0: [sda] Assuming drive cache: write through
  sda: sda1
+ sda: p1 exceeds device capacity

--  snip  --

Does reverting the commit below fix the problem?

cu
Adrian


commit 3f6270ef76f2ce5c134615a470685d6c2a66c07e
Author: FUJITA Tomonori [EMAIL PROTECTED]
Date:   Mon May 14 20:17:27 2007 +0900

[SCSI] megaraid_old: convert to use the data buffer accessors

- remove the unnecessary map_single path.

- convert to use the new accessors for the sg lists and the
parameters.

Jens Axboe [EMAIL PROTECTED] did the for_each_sg cleanup.

Signed-off-by: FUJITA Tomonori [EMAIL PROTECTED]
Acked-by: Sumant Patro [EMAIL PROTECTED]
Signed-off-by: James Bottomley [EMAIL PROTECTED]

diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 40ee07d..3907f67 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -523,10 +523,8 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int 
*busy)
/*
 * filter the internal and ioctl commands
 */
-   if((cmd-cmnd[0] == MEGA_INTERNAL_CMD)) {
-   return cmd-request_buffer;
-   }
-
+   if((cmd-cmnd[0] == MEGA_INTERNAL_CMD))
+   return (scb_t *)cmd-host_scribble;
 
/*
 * We know what channels our logical drives are on - mega_find_card()
@@ -657,22 +655,14 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int 
*busy)
 
case MODE_SENSE: {
char *buf;
+   struct scatterlist *sg;
 
-   if (cmd-use_sg) {
-   struct scatterlist *sg;
+   sg = scsi_sglist(cmd);
+   buf = kmap_atomic(sg-page, KM_IRQ0) + sg-offset;
 
-   sg = (struct scatterlist *)cmd-request_buffer;
-   buf = kmap_atomic(sg-page, KM_IRQ0) +
-   sg-offset;
-   } else
-   buf = cmd-request_buffer;
memset(buf, 0, cmd-cmnd[4]);
-   if (cmd-use_sg) {
-   struct scatterlist *sg;
+   kunmap_atomic(buf - sg-offset, KM_IRQ0);
 
-   sg = (struct scatterlist *)cmd-request_buffer;
-   kunmap_atomic(buf - sg-offset, KM_IRQ0);
-   }
cmd-result = (DID_OK  16);
cmd-scsi_done(cmd);
return NULL;
@@ -1551,23 +1541,15 @@ mega_cmd_done(adapter_t *adapter, u8 completed[], int 
nstatus, int status)
islogical = adapter-logdrv_chan[cmd-device-channel];
if( cmd-cmnd[0] == INQUIRY  !islogical ) {
 
-   if( cmd-use_sg ) {
-   sgl = (struct scatterlist *)
-   cmd-request_buffer;
-
-   if( sgl-page ) {
-   c = *(unsigned char *)
+   sgl = scsi_sglist(cmd);
+   if( sgl-page ) {
+   c = *(unsigned char *)
page_address((sgl[0])-page) +
(sgl[0])-offset; 
-   }
-   else {
-   printk(KERN_WARNING
-   megaraid: invalid sg.\n);
-   c = 0;
-   }
-   }
-   else {
-   c = *(u8 *)cmd-request_buffer;
+   } else {
+   printk(KERN_WARNING
+  megaraid: 

Re: [RFC PATCH] SCSI: split Kconfig menu into two

2007-09-15 Thread Adrian Bunk
On Fri, Sep 14, 2007 at 10:01:18PM +0200, Stefan Richter wrote:
 On 14 Sep, Adrian Bunk wrote:
  On Fri, Sep 14, 2007 at 09:00:33PM +0200, Sam Ravnborg wrote:
  Hi Stefan.
  
  Such a patch really calls for some minimal unifacation among
  the architectures.
  
   
arch/alpha/Kconfig|2 
arch/arm/Kconfig  |2 
arch/avr32/Kconfig|2 
arch/blackfin/Kconfig |2 
arch/cris/Kconfig |2 
arch/frv/Kconfig  |2 
arch/i386/Kconfig |2 
arch/ia64/Kconfig |2 
arch/m32r/Kconfig |2 
arch/m68k/Kconfig |2 
arch/m68knommu/Kconfig|2 
arch/mips/Kconfig |2 
arch/parisc/Kconfig   |2 
arch/powerpc/Kconfig  |2 
arch/ppc/Kconfig  |2 
arch/s390/Kconfig |2 
arch/sh/Kconfig   |2 
arch/sh64/Kconfig |2 
arch/sparc/Kconfig|2 
arch/sparc64/Kconfig  |2 
arch/um/Kconfig   |2 
arch/v850/Kconfig |2 
arch/x86_64/Kconfig   |4 
arch/xtensa/Kconfig   |2 
  
  
  Exactly the same change for all architectures.
  IT would be good to introduce a common file that contains
  some of the shared stuff from the different architectures.
  We could start out simple with:
  
  arch/Kconfig.arch:
 ...
 
 Yes, that would be good.  But Adrian has a point too.
 
  Stefan simply shouldn't move it out of drivers/Kconfig.
...
  drivers/Kconfig   |4 
  drivers/scsi/Kconfig  | 1589 --
  drivers/scsi/Kconfig.lowlevel | 1578 +
  3 files changed, 1588 insertions(+), 1583 deletions(-)

Nearly right.  ;-)

There are a few architectures not (yet) using drivers/Kconfig.

 Index: linux-2.6.23-rc6/drivers/Kconfig
 ===
 --- linux-2.6.23-rc6.orig/drivers/Kconfig
 +++ linux-2.6.23-rc6/drivers/Kconfig
 @@ -1,5 +1,7 @@
  # drivers/Kconfig
  
 +source drivers/scsi/Kconfig
 +
  menu Device Drivers
  
  source drivers/base/Kconfig
 @@ -22,7 +24,7 @@ source drivers/misc/Kconfig
  
  source drivers/ide/Kconfig
  
 -source drivers/scsi/Kconfig
 +source drivers/scsi/Kconfig.lowlevel
  
  source drivers/ata/Kconfig
...

This way the order is wrong:

There should first be the lowlevel SCSI, SATA, USB etc. drivers, these 
drivers should select CONFIG_SCSI, and then the menu offering support 
for disk, CD,...

 Index: linux-2.6.23-rc6/drivers/scsi/Kconfig
 ===
 --- linux-2.6.23-rc6.orig/drivers/scsi/Kconfig
 +++ linux-2.6.23-rc6/drivers/scsi/Kconfig
 @@ -1,14 +1,7 @@
 -menu SCSI device support
 -
 -config RAID_ATTRS
 - tristate RAID Transport Class
 - default n
 - depends on BLOCK
 - ---help---
 -   Provides RAID
 +menu Storage (core and SCSI commands)
  
  config SCSI
 - tristate SCSI device support
 + tristate Storage support (core and SCSI commands)
   depends on BLOCK
   select SCSI_DMA if HAS_DMA
   ---help---
...

What is storage support?
SATA?
PATA?
USB mass storage?
MMC?
MTD?

Whether or not a driver uses the SCSI layer is an implementation detail 
(it even differs for the two USB mass storage implementations and the 
two PATA implementations in the kernel) the user shouldn't have to know 
about.

I don't see any reason why CONFIG_SCSI should have to stay user-visible 
at all after your patch.

 Stefan Richter

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: [RFC PATCH] SCSI: split Kconfig menu into two

2007-09-15 Thread Adrian Bunk
On Sat, Sep 15, 2007 at 02:24:17PM +0200, Stefan Richter wrote:
 Adrian Bunk wrote:
...
   # drivers/Kconfig
   
  +source drivers/scsi/Kconfig
  +
   menu Device Drivers
   
   source drivers/base/Kconfig
  @@ -22,7 +24,7 @@ source drivers/misc/Kconfig
   
   source drivers/ide/Kconfig
   
  -source drivers/scsi/Kconfig
  +source drivers/scsi/Kconfig.lowlevel
   
   source drivers/ata/Kconfig
  ...
  
  This way the order is wrong:
  
  There should first be the lowlevel SCSI, SATA, USB etc. drivers, these 
  drivers should select CONFIG_SCSI, and then the menu offering support 
  for disk, CD,...
 
 The order was inspired by
 
   # the protocols etc.
   Networking
 
   # the interconnects
   Device Drivers/ Network device support
 
 So that order is wrong too?

It's different since _all_ network device drivers require networking 
support.

 However, there is also precedence for the order which you suggest:  The
 partition and filesystems options come after device driver options.
 
 [...]
  +menu Storage (core and SCSI commands)
   
   config SCSI
  -  tristate SCSI device support
  +  tristate Storage support (core and SCSI commands)
 depends on BLOCK
 select SCSI_DMA if HAS_DMA
 ---help---
  ...
  
  What is storage support?
  SATA?
  PATA?
  USB mass storage?
  MMC?
  MTD?
 
 What is Networking?  Ethernet?  Infiniband?  ...?

Different to CONFIG_SCSI, CONFIG_NET=n is so exotic that we should 
change it to no longer show users the question unless CONFIG_EMBEDDED=y.

  Whether or not a driver uses the SCSI layer is an implementation detail 
  (it even differs for the two USB mass storage implementations and the 
  two PATA implementations in the kernel) the user shouldn't have to know 
  about.
  
  I don't see any reason why CONFIG_SCSI should have to stay user-visible 
  at all after your patch.
 
 Vice versa, I don't see any reason for select SCSI anywhere after my
 patch.

If users who don't need it now enable CONFIG_SCSI (and drivers/ide/ 
usage is not that uncommon) that's a regression in the user interface.

If the lowlevel SCSI drivers move into a separate menu as your patch 
does, we simply no longer have any good reason for bothering the user 
with the CONFIG_SCSI.

 Stefan Richter

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 update] SCSI: update Kconfig help text to indicate SCSI core's widespread usage

2007-09-15 Thread Adrian Bunk
On Fri, Sep 14, 2007 at 11:14:21PM +0200, Stefan Richter wrote:
 Signed-off-by: Stefan Richter [EMAIL PROTECTED]
 ---
 
 And one more update:
 There is SAS too, and I forgot 'is' in on a disk which __ accessed via.
 
  drivers/scsi/Kconfig |   67 ++-
  1 file changed, 35 insertions(+), 32 deletions(-)
 
 Index: linux-2.6.23-rc6/drivers/scsi/Kconfig
 ===
 --- linux-2.6.23-rc6.orig/drivers/scsi/Kconfig
 +++ linux-2.6.23-rc6/drivers/scsi/Kconfig
 @@ -12,23 +12,31 @@ config SCSI
   depends on BLOCK
   select SCSI_DMA if HAS_DMA
   ---help---
 -   If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
 -   any other SCSI device under Linux, say Y and make sure that you know
 -   the name of your SCSI host adapter (the card inside your computer
 -   that speaks the SCSI protocol, also called SCSI controller),
 -   because you will be asked for it.
 -
 -   You also need to say Y here if you have a device which speaks
 -   the SCSI protocol.  Examples of this include the parallel port
 -   version of the IOMEGA ZIP drive, USB storage devices, Fibre
 -   Channel, FireWire storage and the IDE-SCSI emulation driver.
 +   This option enables core support for SCSI protocols.
 +   You need it
 +   - for classic parallel SCSI hardware,
 +   - for newer SCSI transports such as Fibre Channel, FireWire storage,
 + SAS, or iSCSI,
 +   - for non-SCSI hardware which speaks SCSI protocols, such as USB
 + storage devices or the parallel port version of Iomega Zip drive,


but not for CONFIG_BLK_DEV_UB


 +   - for non-SCSI hardware whose drivers translate from and to SCSI
 + protocols, most notably all Serial ATA drivers, and Parallel ATA
 + via the ATA configuration option.


but not for CONFIG_BLK_DEV_IDE_SATA


 To compile this driver as a module, choose M here and read
 file:Documentation/scsi/scsi.txt.
 The module will be called scsi_mod.
  
 However, do not compile this as a module if your root file system
 -   (the one containing the directory /) is located on a SCSI device.
 +   (the one containing the directory /) is located on a SCSI device
 +   or on a device whose driver represents it as SCSI device, as
 +   indicated above.  Choose Y in this case, or set up an initrd.
 +
 +   Subsequent options in this menu enable specific SCSI command set
 +   support for harddisks, CD/DVD-ROM/R/W, tapes etc..  This menu also
 +   presents options for specific SCSI controllers, while options for
 +   some other SCSI transports and all non-SCSI controllers are located
 +   in other menus (SATA, USB, FireWire etc.).
...


You expect all kconfig users to read and completely understand this?

Although it's no longer required that the user sees the CONFIG_SCSI 
option at all since we can determine automaically when it's required
and when not?


 Stefan Richter

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: [RFC PATCH] SCSI: split Kconfig menu into two

2007-09-15 Thread Adrian Bunk
On Sat, Sep 15, 2007 at 03:20:06PM +0200, Stefan Richter wrote:
 Adrian Bunk wrote:
  There should first be the lowlevel SCSI, SATA, USB etc. drivers, these 
  drivers should select CONFIG_SCSI, and then the menu offering support 
  for disk, CD,...
 ...
  If users who don't need it now enable CONFIG_SCSI (and drivers/ide/ 
  usage is not that uncommon) that's a regression in the user interface.
 
 Aha, first all interconnects/transports are configured.  If none of them
 'select'ed SCSI, the menu for sd, sr, st stays invisible.  Otherwise it
 is exposed.
 
 It still doesn't entirely clarify whether users need sd, sr, st, and
 whether thy need sd for the disk with root filesystem.

If you want to do it in a really perfect way, help texts aren't the 
solution. You'll have to make the options like CONFIG_BLK_DEV_SR no 
longer be user visible and select'ed through dummy options like e.g.:

config USB_STORAGE
tristate USB Mass Storage support
depends on USB
select SCSI
help
  ...

config USB_STORAGE_SD
tristate USB Mass Storage hard disk support
depends on USB_STORAGE
select BLK_DEV_SD
help
  ...

config USB_STORAGE_SR
tristate USB Mass Storage CD/DVD support
depends on USB_STORAGE
select BLK_DEV_SR
help
  ...


 Stefan Richter

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: [RFC PATCH] SCSI: split Kconfig menu into two

2007-09-15 Thread Adrian Bunk
On Sat, Sep 15, 2007 at 04:11:45PM +0200, Stefan Richter wrote:
 Adrian Bunk wrote:
  On Sat, Sep 15, 2007 at 03:20:06PM +0200, Stefan Richter wrote:
  It still doesn't entirely clarify whether users need sd, sr, st, and
  whether thy need sd for the disk with root filesystem.
  
  If you want to do it in a really perfect way, help texts aren't the 
  solution. You'll have to make the options like CONFIG_BLK_DEV_SR no 
  longer be user visible and select'ed through dummy options like e.g.:
 ...
  tristate USB Mass Storage hard disk support
  depends on USB_STORAGE
  select BLK_DEV_SD
 ...
  tristate USB Mass Storage CD/DVD support
  depends on USB_STORAGE
  select BLK_DEV_SR
 ...
 
 Perfect is in the eye of the beholder.  You would consequently have to
 add such options into all menus which contain scsi low-level providers.

Kconfig is a user interface, so perfect is what is best for the
kconfig users.

 Also, one more question on whether CONFIG_SCSI ought to be 'select'ed:
 Where do scsi-core options like CONFIG_SCSI_CONSTANTS go?

The first question is whether it's for actual SCSI hardware [1] or for 
the block layer functionality which the SCSI subsystem has become.
The mixture of these two is the root of much user confusion.

With the help text The error messages regarding your SCSI hardware will 
be easier to understand if you say Y here a user wouldn't have expected 
to see you using it in a firewire driver. But unless I miss anything, 
the setting of SCSI_SCAN_ASYNC does only affect real SCSI hardware.

If you check each option and place it either in the generic storage menu 
or the SCSI lowlevel menu this would fix much possible user confusion.

But these are relatively unimportant options compared to e.g.
USB_STORAGE=y, BLK_DEV_SD=n, which is a misconfiguration many
users run into, so having one menu somewhere with these advanced 
options should be enough.

 Stefan Richter

cu
Adrian

[1] SCSI as in sold as SCSI

-- 

   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: [RFC PATCH] SCSI: split Kconfig menu into two

2007-09-15 Thread Adrian Bunk
On Sat, Sep 15, 2007 at 11:44:59AM -0400, Jeff Garzik wrote:
 Stefan Richter wrote:
 Adrian Bunk wrote:
 On Sat, Sep 15, 2007 at 04:11:45PM +0200, Stefan Richter wrote:
 Perfect is in the eye of the beholder.  You would consequently have to
 add such options into all menus which contain scsi low-level providers.
 Kconfig is a user interface, so perfect is what is best for the
 kconfig users.
 Duplicate options with different names in different menus, but which all
 do the same, --- is this the best for users?

 I recognize it's a rhetorical question :)  The answer is of course no.

 I hope the other participants of this thread register the severe 
 disinclination of the maintainers to change this stuff, as this is a 
 classic case of making a mountain out of a molehill[1].

 For the -vast majority- of people configuring the kernel, this is not a 
 problem.  Kernel people are -expected- to know what they're doing, 

I doubt your claim is true since the vast majority of kconfig users
are most likely not kernel developers.

@Greg:
Do you have any numbers regarding how your Linux Kernel in a Nutshell 
is selling?
Even download numbers?

 especially when switching from one major subsystem to another.

It's not only about switching, the same problems awaits people when 
configuring a kernel for their hardware the first time.

 Therefore, all this is IMO wasted effort and hot air.  There are far more 
 important issues to deal with.

Why don't we dump kconfig and write the .config by hand?  ;-)

More seriously:
Yes, there are many other important issues in the kernel.
But not fixing kconfig UI problems doesn't fix these issues faster.

I have seen people running into problems because some required 
option wasn't set - in the simplest cases things like IDE without DMA 
because a help text wasn't updated when more hardware support was added 
to a driver.

You might not care about the kconfig users.
But other people do.

   Jeff
...

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: sata scsi suggestion for make menuconfig

2007-09-14 Thread Adrian Bunk
On Fri, Sep 14, 2007 at 04:54:07PM +0200, Stefan Richter wrote:
 Adrian Bunk wrote:
  On Sun, Sep 09, 2007 at 05:11:44PM -0400, Jeff Garzik wrote:
  Let's step back a moment and consider the actual scale and impact of the 
  problem at hand.
 
  The vast majority of users are consumers of pre-compiled kernels, built by 
  People With Clue(tm), who figured this stuff out as soon as it was 
  introduced.
 [...]
  In my experience, the vast majority of kconfig users are not the few 
  people working on distribution kernels, most of the kconfig userbase 
  could be better described by the use case sysadmin who knows about the 
  hardware in his machine and which filesystems he uses.
 
 The patch which is discussed here is specifically targeted towards users
 who are convinced that they can migrate to different drivers without
 reading Kconfig help texts.

Nothing about the patch is only about migration.

The same applies if you configure a kernel from scratch.

Do make menuconfig with the .config you are normally using, count the 
number of options that are visible, and ask yourself whether we can 
really expect users to read the help texts for every single option shown.

People mostly read help texts for options where they don't understand 
what this option is about - and Serial ATA therefore is an option that 
is likely to get enabled without the user looking at the help text.

 Stefan Richter

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: [RFC PATCH] SCSI: split Kconfig menu into two

2007-09-14 Thread Adrian Bunk
On Fri, Sep 14, 2007 at 09:00:33PM +0200, Sam Ravnborg wrote:
 Hi Stefan.
 
 Such a patch really calls for some minimal unifacation among
 the architectures.
 
  
   arch/alpha/Kconfig|2 
   arch/arm/Kconfig  |2 
   arch/avr32/Kconfig|2 
   arch/blackfin/Kconfig |2 
   arch/cris/Kconfig |2 
   arch/frv/Kconfig  |2 
   arch/i386/Kconfig |2 
   arch/ia64/Kconfig |2 
   arch/m32r/Kconfig |2 
   arch/m68k/Kconfig |2 
   arch/m68knommu/Kconfig|2 
   arch/mips/Kconfig |2 
   arch/parisc/Kconfig   |2 
   arch/powerpc/Kconfig  |2 
   arch/ppc/Kconfig  |2 
   arch/s390/Kconfig |2 
   arch/sh/Kconfig   |2 
   arch/sh64/Kconfig |2 
   arch/sparc/Kconfig|2 
   arch/sparc64/Kconfig  |2 
   arch/um/Kconfig   |2 
   arch/v850/Kconfig |2 
   arch/x86_64/Kconfig   |4 
   arch/xtensa/Kconfig   |2 
 
 
 Exactly the same change for all architectures.
 IT would be good to introduce a common file that contains
 some of the shared stuff from the different architectures.
 We could start out simple with:
 
 arch/Kconfig.arch:
...

Stefan simply shouldn't move it out of drivers/Kconfig.

   Sam

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] Update version information of ips driver

2007-09-04 Thread Adrian Bunk
On Tue, Sep 04, 2007 at 04:16:26PM +0200, Bernhard Walle wrote:
 This patch just makes the version number in ips.c and ips.h consistent. It
 seems that this has been forgotten in 
 a60768e2d43eb30a1adb8a119aeac35dc0d03ef6.

A better fix would be to no longer have two different places defining a 
version number.

 Signed-off-by: Bernhard Walle [EMAIL PROTECTED]
 
 ---
  drivers/scsi/ips.h |6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 --- a/drivers/scsi/ips.h
 +++ b/drivers/scsi/ips.h
 @@ -1175,9 +1175,9 @@ typedef struct {
  #define IPS_VER_MAJOR_STRING 7
  #define IPS_VER_MINOR 12
  #define IPS_VER_MINOR_STRING 12
 -#define IPS_VER_BUILD 02
 -#define IPS_VER_BUILD_STRING 02
 -#define IPS_VER_STRING 7.12.02
 +#define IPS_VER_BUILD 05
 +#define IPS_VER_BUILD_STRING 05
 +#define IPS_VER_STRING 7.12.05
  #define IPS_RELEASE_ID 0x0002
  #define IPS_BUILD_IDENT 761
  #define IPS_LEGALCOPYRIGHT_STRING (C) Copyright IBM Corp. 1994, 2002. All 
 Rights Reserved.

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


[2.6 patch] drivers/scsi/imm.c: fix check-after-use

2007-08-27 Thread Adrian Bunk
The Coverity checker spotted that we have already oops'ed if cmd
was NULL.

Since cmd being NULL doesn't seem to be possible at this point this 
patch removes the NULL check.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch has been sent on:
- 31 Jul 2007

--- linux-2.6.23-rc1-mm1/drivers/scsi/imm.c.old 2007-07-30 13:58:00.0 
+0200
+++ linux-2.6.23-rc1-mm1/drivers/scsi/imm.c 2007-07-30 13:58:24.0 
+0200
@@ -740,10 +740,6 @@ static void imm_interrupt(struct work_st
struct Scsi_Host *host = cmd-device-host;
unsigned long flags;
 
-   if (!cmd) {
-   printk(IMM: bug in imm_interrupt\n);
-   return;
-   }
if (imm_engine(dev, cmd)) {
schedule_delayed_work(dev-imm_tq, 1);
return;
-
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] debloat aic7xxx and aic79xx drivers by deinlining

2007-08-26 Thread Adrian Bunk
On Sun, Aug 26, 2007 at 04:21:30PM +0100, Denys Vlasenko wrote:
 On Saturday 25 August 2007 22:57, Arjan van de Ven wrote:
...
  Did you run the find static
  script or are you waiting for Adrian to do that ;-)
 
 $ find -name '*find*static*'
 $

  make namespacecheck

 vda

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 05/30] drivers/scsi/pcmcia/nsp_cs.c: remove kernel 2.4 code

2007-08-10 Thread Adrian Bunk
On Fri, Aug 10, 2007 at 09:01:59PM -0400, James Bottomley wrote:
 On Fri, 2007-08-10 at 14:50 -0700, [EMAIL PROTECTED] wrote:
  From: Adrian Bunk [EMAIL PROTECTED]
 
 You're not just removing the 2.4 code ... you're also removing the rcs
 tags ... that's OK if the maintainer is fine with this, but it would
 help to say this in the change log.

It was in the patch description when I sent the patch [1, 2], but it 
seems the patch description got lost somewhere.

 James

cu
Adrian

[1] http://lkml.org/lkml/2007/3/26/2
[2] http://lkml.org/lkml/2007/4/26/654

-- 

   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 13/30] nsp32_restart_autoscsi(): remove error check

2007-08-10 Thread Adrian Bunk
On Fri, Aug 10, 2007 at 09:03:52PM -0400, James Bottomley wrote:
 On Fri, 2007-08-10 at 14:50 -0700, [EMAIL PROTECTED] wrote:
  From: Adrian Bunk [EMAIL PROTECTED]
  
  The Coverity checker noted that we'll anyway Oops later when we ran into
  this condition - and the error check didn't prevent that.
  
  Considering that the error condition shouldn't be possible, and we are
  not able to handle it easily, this patch simply removes the pointless
  error check.
  
  Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Signed-off-by: Andrew Morton [EMAIL PROTECTED]
  ---
  
   drivers/scsi/nsp32.c |4 
   1 files changed, 4 deletions(-)
  
  diff -puN drivers/scsi/nsp32.c~nsp32_restart_autoscsi-remove-error-check 
  drivers/scsi/nsp32.c
  --- a/drivers/scsi/nsp32.c~nsp32_restart_autoscsi-remove-error-check
  +++ a/drivers/scsi/nsp32.c
  @@ -1905,10 +1905,6 @@ static void nsp32_restart_autoscsi(struc
   
  nsp32_dbg(NSP32_DEBUG_RESTART, enter);
   
  -   if (data-cur_target == NULL || data-cur_lunt == NULL) {
  -   nsp32_msg(KERN_ERR, Target or Lun is invalid);
  -   }
  -
 
 I disagree pretty strongly with this ... you're not removing an error
 check, you're removing a warning printk.  Before the driver would say
 what the problem is and oops.  After, it will oops and you won't
 necessarily know why.  I think that's a retrograde step.

Target or Lun is invalid isn't a precise problem description either.

But the main point is:

An Oops indicates a programming error in the kernel (or kernel 
corruption), and for this purpose an Oops is a good error message.

We can't put printk()'s in front of all pointer dereferences in the 
kernel.

Is there any legal way how any of these could be NULL at this point?
My impression was there isn't.
But if there is we don't need only a printk(), we'd need an error 
handling that returns from the function without Oops'ing plus an error 
handling in the caller.

 James

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


[2.6 patch] drivers/scsi/imm.c: fix check-after-use

2007-07-30 Thread Adrian Bunk
The Coverity checker spotted that we have already oops'ed if cmd
was NULL.

Since cmd being NULL doesn't seem to be possible at this point this 
patch removes the NULL check.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

--- linux-2.6.23-rc1-mm1/drivers/scsi/imm.c.old 2007-07-30 13:58:00.0 
+0200
+++ linux-2.6.23-rc1-mm1/drivers/scsi/imm.c 2007-07-30 13:58:24.0 
+0200
@@ -740,10 +740,6 @@ static void imm_interrupt(struct work_st
struct Scsi_Host *host = cmd-device-host;
unsigned long flags;
 
-   if (!cmd) {
-   printk(IMM: bug in imm_interrupt\n);
-   return;
-   }
if (imm_engine(dev, cmd)) {
schedule_delayed_work(dev-imm_tq, 1);
return;
-
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 patch] drivers/scsi/scsi_error.c should #include scsi_transport_api.h

2007-07-29 Thread Adrian Bunk
Every file should #include the headers containing the prototypes for
its global functions (in this case for scsi_schedule_eh()).

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
--- linux-2.6.23-rc1-mm1/drivers/scsi/scsi_error.c.old  2007-07-28 
17:10:48.0 +0200
+++ linux-2.6.23-rc1-mm1/drivers/scsi/scsi_error.c  2007-07-28 
17:10:51.0 +0200
@@ -37,6 +37,7 @@
 
 #include scsi_priv.h
 #include scsi_logging.h
+#include scsi_transport_api.h
 
 #define SENSE_TIMEOUT  (10*HZ)
 

-
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 patch] drivers/scsi/constants.c: make 2 functions static

2007-07-29 Thread Adrian Bunk
This patch makes two needlessly global functions static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch has been sent on:
- 24 Mar 2007

 drivers/scsi/constants.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.21-rc4-mm1/drivers/scsi/constants.c.old   2007-03-23 
23:26:39.0 +0100
+++ linux-2.6.21-rc4-mm1/drivers/scsi/constants.c   2007-03-23 
23:26:55.0 +0100
@@ -1235,7 +1235,7 @@
 }
 EXPORT_SYMBOL(scsi_print_sense_hdr);
 
-void
+static void
 scsi_decode_sense_buffer(const unsigned char *sense_buffer, int sense_len,
   struct scsi_sense_hdr *sshdr)
 {
@@ -1258,7 +1258,7 @@
}
 }
 
-void
+static void
 scsi_decode_sense_extras(const unsigned char *sense_buffer, int sense_len,
 struct scsi_sense_hdr *sshdr)
 {

-
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.23-rc1-mm1: SCSI_SRP_ATTRS compile error

2007-07-25 Thread Adrian Bunk
On Wed, Jul 25, 2007 at 05:36:56PM +0100, Andy Whitcroft wrote:
 Of the machines we test releases on automatically this only compiles on
 NUMA-Q and does not boot there (some PCI issue).
 
 
 ppc64 (beavis):
 
 drivers/built-in.o(.text+0xd2784): In function `.srp_rport_add':
 : undefined reference to `.scsi_tgt_it_nexus_create'
 drivers/built-in.o(.text+0xd2884): In function `.srp_rport_del':
 : undefined reference to `.scsi_tgt_it_nexus_destroy'
 make: *** [.tmp_vmlinux1] Error 1
 
 
 x86_64 (bl6-13):
 
 ERROR: scsi_tgt_it_nexus_destroy [drivers/scsi/scsi_transport_srp.ko]
 undefined!
 ERROR: scsi_tgt_it_nexus_create [drivers/scsi/scsi_transport_srp.ko]
 undefined!
 make[1]: *** [__modpost] Error 1
...

Caused-By  : git-scsi-target.patch
Workaround : enable CONFIG_SCSI_TGT

Is there any good reason why all the SCSI transport attributes options 
are user visible?

With an answer to this question I can fix this bug.

 -apw

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


drivers/message/fusion/mptscsih.c: inconsequent NULL checking

2007-07-23 Thread Adrian Bunk
The Coverity checker spotted the following inconsequent NULL checking in 
drivers/message/fusion/mptscsih.c:

--  snip  --

...
int
mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
{
...
if (vdev
 (vdev-vtarget-tflags  MPT_TARGET_FLAGS_Q_YES)
 (SCpnt-device-tagged_supported)) { 
scsictl = scsidir | MPI_SCSIIO_CONTROL_SIMPLEQ;
} else {
scsictl = scsidir | MPI_SCSIIO_CONTROL_UNTAGGED; 
}
 
/* Use the above information to set up the message frame
 */
pScsiReq-TargetID = (u8) vdev-vtarget-id;
...

--  snip  --

vdev is first checked but later dereferenced unconditionally.

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


2.6.23 regression: lpfc_sli.c: off-by-10

2007-07-22 Thread Adrian Bunk
The Coverity checker spotted the following off-by-10
in drivers/scsi/lpfc/lpfc_sli.c:


--  snip  --

...
static int
lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
struct lpfc_iocbq *saveq)
{
...
saveq-context3 = lpfc_sli_replace_hbqbuff(phba,
irsp-un.ulpWord[15]);
...

--  snip  --


due to the following code in drivers/scsi/lpfc/lpfc_hw.h:


--  snip  --

...
#define IOCB_WORD_SZ8
...
typedef struct _IOCB {  /* IOCB structure */
...
uint32_t ulpWord[IOCB_WORD_SZ - 2]; /* generic 6 'words' */
...

--  snip  --


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


2.6.22-rc6-mm1: multiple definition of `check_reset'

2007-06-28 Thread Adrian Bunk
On Thu, Jun 28, 2007 at 03:43:21AM -0700, Andrew Morton wrote:
...
 Changes since 2.6.22-rc4-mm2:
...
  git-scsi-misc.patch
...
  git trees
...


--  snip  --

...
  LD  drivers/built-in.o
drivers/isdn/built-in.o: In function `check_reset': (.text+0xab974):
multiple definition of `check_reset'
drivers/scsi/built-in.o:(.data+0xdba8): first defined here
ld: Warning: size of symbol `check_reset' changed from 4 in 
drivers/scsi/built-in.o to 214 in drivers/isdn/built-in.o
ld: Warning: type of symbol `check_reset' changed from 1 to 2 in 
drivers/isdn/built-in.o
make[2]: *** [drivers/built-in.o] Error 1

--  snip  --


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


[-mm patch] scsi/lpfc/lpfc_init.c: remove unused variable

2007-04-28 Thread Adrian Bunk
This patch removes a no longer used variable:

--  snip  --

...
  CC  drivers/scsi/lpfc/lpfc_init.o
/home/bunk/linux/kernel-2.6/linux-2.6.21-rc7-mm2/drivers/scsi/lpfc/lpfc_init.c: 
In function ‘lpfc_pci_probe_one’:
/home/bunk/linux/kernel-2.6/linux-2.6.21-rc7-mm2/drivers/scsi/lpfc/lpfc_init.c:1419:
 warning: unused variable ‘retval’
...

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---
--- linux-2.6.21-rc7-mm2/drivers/scsi/lpfc/lpfc_init.c.old  2007-04-28 
15:20:42.0 +0200
+++ linux-2.6.21-rc7-mm2/drivers/scsi/lpfc/lpfc_init.c  2007-04-28 
15:20:57.0 +0200
@@ -1416,7 +1416,7 @@
struct lpfc_sli  *psli;
struct lpfc_iocbq *iocbq_entry = NULL, *iocbq_next = NULL;
unsigned long bar0map_len, bar2map_len;
-   int error = -ENODEV, retval;
+   int error = -ENODEV;
int i;
uint16_t iotag;
 

-
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 patch] drivers/scsi/nsp32.c: remove kernel 2.4 code

2007-04-27 Thread Adrian Bunk
On Fri, Apr 27, 2007 at 10:55:54AM -0400, Robert P. J. Day wrote:
 On Thu, 26 Apr 2007, James Bottomley wrote:
 
  Personally, I don't like to see 2.4 and 2.6 in a new driver, and
  will tend to try to force it to be 2.6 only.  For an existing
  driver, I tend to be much more tolerant: removing the huge gobs of
  code to achieve 2.6 only is usually a bit disruptive on both the
  driver and the maintainer
 
   But if a driver is no longer actually maintained for both kernels
   these checks become useless (and there quickly arised
   unconditional 2.6-only code in such a driver) and can be removed.
 
  This driver is maintained by
 
  Yokota Hiroshi [EMAIL PROTECTED]
  GOTO Masanori [EMAIL PROTECTED]
 
  As it says in the header.  It was last modified in May 2006, so it
  is maintained under the somewhat elastic standards of SCSI.  I've
  cc'd them to see what they think.
 
 while we're on the subject, what's the policy on supporting kernel
 version selection *within* the 2.5 series?  as in:
 
 $ grep -r KERNEL_VERSION(2,5 *
 drivers/scsi/pcmcia/nsp_cs.h:#if (LINUX_VERSION_CODE = 
 KERNEL_VERSION(2,5,74))
 drivers/scsi/pcmcia/nsp_cs.c:#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0))
 drivers/scsi/pcmcia/nsp_cs.c:#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,2))
 drivers/scsi/pcmcia/nsp_cs.c:#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73))
 ... etc etc ...
 
 granted, this doesn't happen in a lot of files (almost of them
 SCSI-related), but is it official policy to support code based on its
 release number in the 2.5 series of releases?  unless you have a good
 reason, wouldn't it make more sense to compare against (2,6,0) rather
 than, say, (2,5,73)?  just an observation.

Besides the fact that I sent a patch to remove the compat code from this 
driver, it simply doesn't matter whether to compare with (2,5,73) or 
(2,6,0), so there's no reason for changing it.

 rday

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


[2.6 patch] drivers/scsi/pcmcia/nsp_cs.c: remove kernel 2.4 code

2007-04-26 Thread Adrian Bunk
This patch removes kernel 2.4 code and some ancient CVS tags.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch has been sent on:
- 26 Mar 2007

 drivers/scsi/pcmcia/nsp_cs.c |  159 +--
 drivers/scsi/pcmcia/nsp_cs.h |8 -
 2 files changed, 5 insertions(+), 162 deletions(-)

--- linux-2.6.21-rc4-mm1/drivers/scsi/pcmcia/nsp_cs.h.old   2007-03-25 
19:29:38.0 +0200
+++ linux-2.6.21-rc4-mm1/drivers/scsi/pcmcia/nsp_cs.h   2007-03-25 
19:33:31.0 +0200
@@ -10,8 +10,6 @@
 
 =*/
 
-/* $Id: nsp_cs.h,v 1.19 2003/08/18 11:09:19 elca Exp $ */
-
 #ifndef  __nsp_cs__
 #define  __nsp_cs__
 
@@ -227,13 +225,7 @@
 typedef struct scsi_info_t {
struct pcmcia_device*p_dev;
struct Scsi_Host  *host;
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,5,74))
dev_node_t node;
-#else
-   intndev;
-   dev_node_t node[8];
-   struct bus_operations *bus;
-#endif
intstop;
 } scsi_info_t;
 
--- linux-2.6.21-rc4-mm1/drivers/scsi/pcmcia/nsp_cs.c.old   2007-03-25 
19:30:03.0 +0200
+++ linux-2.6.21-rc4-mm1/drivers/scsi/pcmcia/nsp_cs.c   2007-03-25 
19:40:56.0 +0200
@@ -25,8 +25,6 @@
 
 ***/
 
-/* $Id: nsp_cs.c,v 1.23 2003/08/18 11:09:19 elca Exp $ */
-
 #include linux/version.h
 #include linux/module.h
 #include linux/kernel.h
@@ -59,7 +57,7 @@
 #include nsp_cs.h
 
 MODULE_AUTHOR(YOKOTA Hiroshi [EMAIL PROTECTED]);
-MODULE_DESCRIPTION(WorkBit NinjaSCSI-3 / NinjaSCSI-32Bi(16bit) PCMCIA SCSI 
host adapter module $Revision: 1.23 $);
+MODULE_DESCRIPTION(WorkBit NinjaSCSI-3 / NinjaSCSI-32Bi(16bit) PCMCIA SCSI 
host adapter module);
 MODULE_SUPPORTED_DEVICE(sd,sr,sg,st);
 #ifdef MODULE_LICENSE
 MODULE_LICENSE(GPL);
@@ -83,10 +81,6 @@
.proc_name   = nsp_cs,
.proc_info   = nsp_proc_info,
.name= WorkBit NinjaSCSI-3/32Bi(16bit),
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0))
-   .detect  = nsp_detect_old,
-   .release = nsp_release_old,
-#endif
.info= nsp_info,
.queuecommand= nsp_queuecommand,
 /* .eh_abort_handler= nsp_eh_abort,*/
@@ -97,9 +91,6 @@
.sg_tablesize= SG_ALL,
.cmd_per_lun = 1,
.use_clustering  = DISABLE_CLUSTERING,
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,2))
-   .use_new_eh_code = 1,
-#endif
 };
 
 static nsp_hw_data nsp_data_base; /* attach - detect glue */
@@ -1313,11 +1304,7 @@
nsp_hw_data *data_b = nsp_data_base, *data;
 
nsp_dbg(NSP_DEBUG_INIT, this_id=%d, sht-this_id);
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73))
host = scsi_host_alloc(nsp_driver_template, sizeof(nsp_hw_data));
-#else
-   host = scsi_register(sht, sizeof(nsp_hw_data));
-#endif
if (host == NULL) {
nsp_dbg(NSP_DEBUG_INIT, host failed);
return NULL;
@@ -1354,37 +1341,6 @@
return host; /* detect done. */
 }
 
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0))
-static int nsp_detect_old(struct scsi_host_template *sht)
-{
-   if (nsp_detect(sht) == NULL) {
-   return 0;
-   } else {
-   //MOD_INC_USE_COUNT;
-   return 1;
-   }
-}
-
-
-static int nsp_release_old(struct Scsi_Host *shpnt)
-{
-   //nsp_hw_data *data = (nsp_hw_data *)shpnt-hostdata;
-
-   /* PCMCIA Card Service dose same things below. */
-   /* So we do nothing.   */
-   //if (shpnt-irq) {
-   //  free_irq(shpnt-irq, data-ScsiInfo);
-   //}
-   //if (shpnt-io_port) {
-   //  release_region(shpnt-io_port, shpnt-n_io_port);
-   //}
-
-   //MOD_DEC_USE_COUNT;
-
-   return 0;
-}
-#endif
-
 /**/
 /* return info string*/
 /**/
@@ -1403,19 +1359,9 @@
nsp_dbg(NSP_DEBUG_PROC, buffer=0x%p pos=0x%p length=%d 
%d\n, buffer, pos, length,  length - (pos - buffer));\
} \
} while(0)
-static int
-nsp_proc_info(
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73))
-   struct Scsi_Host *host,
-#endif
-   char  *buffer,
-   char **start,
-   off_t  offset,
-   intlength,
-#if !(LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73))
-   inthostno,
-#endif
-   intinout)
+
+static int nsp_proc_info(struct Scsi_Host *host, char *buffer, char **start,
+off_t offset, int length, int inout)
 {
int id;
char *pos = buffer;
@@ -1423,24 +1369,13 @@
int speed;
unsigned long flags

[RFC: 2.6 patch] drivers/scsi/ips.c: remove kernel 2.4 code

2007-04-26 Thread Adrian Bunk
This patch removes some kernel 2.4 code.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch has been sent on:
- 26 Mar 2007

 drivers/scsi/ips.c |  145 +
 drivers/scsi/ips.h |   44 -
 2 files changed, 20 insertions(+), 169 deletions(-)

--- linux-2.6.21-rc4-mm1/drivers/scsi/ips.h.old 2007-03-25 20:10:28.0 
+0200
+++ linux-2.6.21-rc4-mm1/drivers/scsi/ips.h 2007-03-25 20:22:28.0 
+0200
@@ -58,10 +58,6 @@
/*
 * Some handy macros
 */
-   #if LINUX_VERSION_CODE = KERNEL_VERSION(2,4,20) || defined CONFIG_HIGHIO
-  #define IPS_HIGHIO
-   #endif
-
#define IPS_HA(x)   ((ips_ha_t *) x-hostdata)
#define IPS_COMMAND_ID(ha, scb) (int) (scb - ha-scbs)
#define IPS_IS_TROMBONE(ha) (((ha-device_id == 
IPS_DEVICEID_COPPERHEAD)  \
@@ -84,38 +80,8 @@
 #define IPS_SGLIST_SIZE(ha)   (IPS_USE_ENH_SGLIST(ha) ? \
  sizeof(IPS_ENH_SG_LIST) : 
sizeof(IPS_STD_SG_LIST))
 
-   #if LINUX_VERSION_CODE  KERNEL_VERSION(2,4,4)
-  #define pci_set_dma_mask(dev,mask) ( mask  0x ? 1:0 )
-  #define scsi_set_pci_device(sh,dev) (0)
-   #endif
-
-   #ifndef IRQ_NONE
-  typedef void irqreturn_t;
-  #define IRQ_NONE
-  #define IRQ_HANDLED
-  #define IRQ_RETVAL(x)
-   #endif
-   
-   #if LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0)
-  #define IPS_REGISTER_HOSTS(SHT)  
scsi_register_module(MODULE_SCSI_HA,SHT)
-  #define IPS_UNREGISTER_HOSTS(SHT)
scsi_unregister_module(MODULE_SCSI_HA,SHT)
-  #define IPS_ADD_HOST(shost,device)
-  #define IPS_REMOVE_HOST(shost)
-  #define IPS_SCSI_SET_DEVICE(sh,ha)   scsi_set_pci_device(sh, 
(ha)-pcidev)
-  #define IPS_PRINTK(level, pcidev, format, arg...) \
-printk(level %s %s: format , ips , \
-(pcidev)-slot_name , ## arg)
-  #define scsi_host_alloc(sh,size) scsi_register(sh,size)
-  #define scsi_host_put(sh) scsi_unregister(sh)
-   #else
-  #define IPS_REGISTER_HOSTS(SHT)  (!ips_detect(SHT))
-  #define IPS_UNREGISTER_HOSTS(SHT)
-  #define IPS_ADD_HOST(shost,device)   do { scsi_add_host(shost,device); 
scsi_scan_host(shost); } while (0)
-  #define IPS_REMOVE_HOST(shost)   scsi_remove_host(shost)
-  #define IPS_SCSI_SET_DEVICE(sh,ha)   do { } while (0)
-  #define IPS_PRINTK(level, pcidev, format, arg...) \
+  #define IPS_PRINTK(level, pcidev, format, arg...) \
 dev_printk(level , ((pcidev)-dev) , format , ## arg)
-   #endif
 
#define MDELAY(n)   \
do {\
@@ -134,7 +100,7 @@
#define pci_dma_hi32(a) ((a  16)  16)
#define pci_dma_lo32(a) (a  0x)
 
-   #if (BITS_PER_LONG  32) || (defined CONFIG_HIGHMEM64G  defined 
IPS_HIGHIO)
+   #if (BITS_PER_LONG  32) || defined(CONFIG_HIGHMEM64G)
   #define IPS_ENABLE_DMA64(1)
#else
   #define IPS_ENABLE_DMA64(0)
@@ -451,16 +417,10 @@
/*
 * Scsi_Host Template
 */
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0)
-   static int ips_proc24_info(char *, char **, off_t, int, int, int);
-   static void ips_select_queue_depth(struct Scsi_Host *, struct scsi_device 
*);
-   static int ips_biosparam(Disk *disk, kdev_t dev, int geom[]);
-#else
static int ips_proc_info(struct Scsi_Host *, char *, char **, off_t, int, 
int);
static int ips_biosparam(struct scsi_device *sdev, struct block_device 
*bdev,
sector_t capacity, int geom[]);
static int ips_slave_configure(struct scsi_device *SDptr);
-#endif
 
 /*
  * Raid Command Formats
--- linux-2.6.21-rc4-mm1/drivers/scsi/ips.c.old 2007-03-25 20:11:39.0 
+0200
+++ linux-2.6.21-rc4-mm1/drivers/scsi/ips.c 2007-03-25 20:20:35.0 
+0200
@@ -211,19 +211,6 @@
 #warning This driver has only been tested on the x86/ia64/x86_64 platforms
 #endif
 
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,5,0)
-#include linux/blk.h
-#include sd.h
-#define IPS_LOCK_SAVE(lock,flags) spin_lock_irqsave(io_request_lock,flags)
-#define IPS_UNLOCK_RESTORE(lock,flags) 
spin_unlock_irqrestore(io_request_lock,flags)
-#ifndef __devexit_p
-#define __devexit_p(x) x
-#endif
-#else
-#define IPS_LOCK_SAVE(lock,flags) do{spin_lock(lock);(void)flags;}while(0)
-#define IPS_UNLOCK_RESTORE(lock,flags) 
do{spin_unlock(lock);(void)flags;}while(0)
-#endif
-
 #define IPS_DMA_DIR(scb) ((!scb-scsi_cmd || ips_is_passthru(scb-scsi_cmd) || 
\
  DMA_NONE == scb-scsi_cmd-sc_data_direction) ? \
  PCI_DMA_BIDIRECTIONAL : \
@@ -381,24 +368,13 @@
.eh_abort_handler   = ips_eh_abort,
.eh_host_reset_handler  = ips_eh_reset,
.proc_name  = ips,
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0)
.proc_info  = ips_proc_info,
.slave_configure

Re: [2.6 patch] drivers/scsi/nsp32.c: remove kernel 2.4 code

2007-04-26 Thread Adrian Bunk
On Thu, Apr 26, 2007 at 07:59:57PM -0400, Robert P. J. Day wrote:
 On Fri, 27 Apr 2007, Adrian Bunk wrote:
 
  This patch removes kernel 2.4 code.
 
  Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
 
  ---
 
  This patch has been sent on:
  - 26 Mar 2007
 
   drivers/scsi/nsp32.c |  109 +--
   1 file changed, 13 insertions(+), 96 deletions(-)
 
  --- linux-2.6.21-rc4-mm1/drivers/scsi/nsp32.c.old   2007-03-25 
  20:27:34.0 +0200
  +++ linux-2.6.21-rc4-mm1/drivers/scsi/nsp32.c   2007-03-25 
  20:31:59.0 +0200
  @@ -49,10 +49,6 @@
   #include scsi/scsi_host.h
   #include scsi/scsi_ioctl.h
 
  -#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,6,0))
  -# include linux/blk.h
  -#endif
  -
 
 i'm curious about the rules for removing code like this.  in the case
 of drivers, isn't it possible that some driver source could be
 relevant for both the 2.4 and 2.6 kernel source tree, and simply uses
 that kind of preprocessor check to make sure it's being compiled
 appropriately?

That's what it was for.

 or are you doing something more sophisticated than simply checking the
 kernel version being tested?

No.

The point is:

It seems this driver was once maintained for both 2.4 and 2.6 in one 
file.

As long as this is done, such version checks are OK.

But if a driver is no longer actually maintained for both kernels these 
checks become useless (and there quickly arised unconditional 2.6-only 
code in such a driver) and can be removed.

 rday

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


2.6.21-rc7: known regressions with patches

2007-04-25 Thread Adrian Bunk
This email lists some known regressions in Linus' tree compared to 2.6.20
with patches available.

If you find your name in the Cc header, you are either submitter of one
of the bugs, maintainer of an affectected subsystem or driver, a patch
of you caused a breakage or I'm considering you in any other way
possibly involved with one or more of these issues.

Due to the huge amount of recipients, please trim the Cc when answering.


Subject: Oops when changing USB DVB-T adapter
References : http://lkml.org/lkml/2007/3/9/212
 http://lkml.org/lkml/2007/4/5/154
Submitter  : CIJOML [EMAIL PROTECTED]
Handled-By : Markus Rechberger [EMAIL PROTECTED]
Status : patches available


Subject: snd_intel8x0: divide error: 
References : http://lkml.org/lkml/2007/3/5/252
Submitter  : Michal Piotrowski [EMAIL PROTECTED]
Handled-By : Takashi Iwai [EMAIL PROTECTED]
Patch  : http://lkml.org/lkml/2007/4/20/117
Status : patch available


Subject: qla2xxx driver no longer works
References : http://lkml.org/lkml/2007/4/16/49
 http://lkml.org/lkml/2007/4/20/224
Submitter  : David Miller [EMAIL PROTECTED]
 Robert Peterson [EMAIL PROTECTED]
Handled-By : David Miller [EMAIL PROTECTED]
Patch  : http://lkml.org/lkml/2007/4/16/234
Status : patch was suggested


-
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/3] 2.6.21-rc7: known regressions (v2)

2007-04-23 Thread Adrian Bunk
This email lists some known regressions in Linus' tree compared to 2.6.20.

If you find your name in the Cc header, you are either submitter of one
of the bugs, maintainer of an affectected subsystem or driver, a patch
of you caused a breakage or I'm considering you in any other way
possibly involved with one or more of these issues.

Due to the huge amount of recipients, please trim the Cc when answering.


Subject: ACPI: Crashes + hangs during modprobe processor
   unless processor.nocst
References : http://bugzilla.kernel.org/show_bug.cgi?id=8346
Submitter  : Olaf Kirch [EMAIL PROTECTED]
Status : unknown


Subject: kernels fail to boot with drives on ATIIXP controller
 (ACPI/IRQ related)
References : https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=229621
 http://lkml.org/lkml/2007/3/4/257
Submitter  : Michal Jaegermann [EMAIL PROTECTED]
Status : unknown


Subject: ali_pata: boot from CD fails
References : http://lkml.org/lkml/2007/3/31/160
Submitter  : Stephen Clark [EMAIL PROTECTED]
Status : unknown


Subject: boot failure: rtl8139: exception in interrupt routine
References : http://lkml.org/lkml/2007/3/31/160
Submitter  : Stephen Clark [EMAIL PROTECTED]
Status : unknown


Subject: qla2xxx driver no longer works
References : http://lkml.org/lkml/2007/4/16/49
 http://lkml.org/lkml/2007/4/20/224
Submitter  : David Miller [EMAIL PROTECTED]
 Robert Peterson [EMAIL PROTECTED]
Handled-By : David Miller [EMAIL PROTECTED]
Patch  : http://lkml.org/lkml/2007/4/16/234
Status : patch was suggested


-
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 patch] drivers/scsi/pcmcia/nsp_cs.c: remove kernel 2.4 code

2007-03-25 Thread Adrian Bunk
This patch removes kernel 2.4 code and some ancient CVS tags.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/pcmcia/nsp_cs.c |  159 +--
 drivers/scsi/pcmcia/nsp_cs.h |8 -
 2 files changed, 5 insertions(+), 162 deletions(-)

--- linux-2.6.21-rc4-mm1/drivers/scsi/pcmcia/nsp_cs.h.old   2007-03-25 
19:29:38.0 +0200
+++ linux-2.6.21-rc4-mm1/drivers/scsi/pcmcia/nsp_cs.h   2007-03-25 
19:33:31.0 +0200
@@ -10,8 +10,6 @@
 
 =*/
 
-/* $Id: nsp_cs.h,v 1.19 2003/08/18 11:09:19 elca Exp $ */
-
 #ifndef  __nsp_cs__
 #define  __nsp_cs__
 
@@ -227,13 +225,7 @@
 typedef struct scsi_info_t {
struct pcmcia_device*p_dev;
struct Scsi_Host  *host;
-#if (LINUX_VERSION_CODE = KERNEL_VERSION(2,5,74))
dev_node_t node;
-#else
-   intndev;
-   dev_node_t node[8];
-   struct bus_operations *bus;
-#endif
intstop;
 } scsi_info_t;
 
--- linux-2.6.21-rc4-mm1/drivers/scsi/pcmcia/nsp_cs.c.old   2007-03-25 
19:30:03.0 +0200
+++ linux-2.6.21-rc4-mm1/drivers/scsi/pcmcia/nsp_cs.c   2007-03-25 
19:40:56.0 +0200
@@ -25,8 +25,6 @@
 
 ***/
 
-/* $Id: nsp_cs.c,v 1.23 2003/08/18 11:09:19 elca Exp $ */
-
 #include linux/version.h
 #include linux/module.h
 #include linux/kernel.h
@@ -59,7 +57,7 @@
 #include nsp_cs.h
 
 MODULE_AUTHOR(YOKOTA Hiroshi [EMAIL PROTECTED]);
-MODULE_DESCRIPTION(WorkBit NinjaSCSI-3 / NinjaSCSI-32Bi(16bit) PCMCIA SCSI 
host adapter module $Revision: 1.23 $);
+MODULE_DESCRIPTION(WorkBit NinjaSCSI-3 / NinjaSCSI-32Bi(16bit) PCMCIA SCSI 
host adapter module);
 MODULE_SUPPORTED_DEVICE(sd,sr,sg,st);
 #ifdef MODULE_LICENSE
 MODULE_LICENSE(GPL);
@@ -83,10 +81,6 @@
.proc_name   = nsp_cs,
.proc_info   = nsp_proc_info,
.name= WorkBit NinjaSCSI-3/32Bi(16bit),
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0))
-   .detect  = nsp_detect_old,
-   .release = nsp_release_old,
-#endif
.info= nsp_info,
.queuecommand= nsp_queuecommand,
 /* .eh_abort_handler= nsp_eh_abort,*/
@@ -97,9 +91,6 @@
.sg_tablesize= SG_ALL,
.cmd_per_lun = 1,
.use_clustering  = DISABLE_CLUSTERING,
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,2))
-   .use_new_eh_code = 1,
-#endif
 };
 
 static nsp_hw_data nsp_data_base; /* attach - detect glue */
@@ -1313,11 +1304,7 @@
nsp_hw_data *data_b = nsp_data_base, *data;
 
nsp_dbg(NSP_DEBUG_INIT, this_id=%d, sht-this_id);
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73))
host = scsi_host_alloc(nsp_driver_template, sizeof(nsp_hw_data));
-#else
-   host = scsi_register(sht, sizeof(nsp_hw_data));
-#endif
if (host == NULL) {
nsp_dbg(NSP_DEBUG_INIT, host failed);
return NULL;
@@ -1354,37 +1341,6 @@
return host; /* detect done. */
 }
 
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0))
-static int nsp_detect_old(struct scsi_host_template *sht)
-{
-   if (nsp_detect(sht) == NULL) {
-   return 0;
-   } else {
-   //MOD_INC_USE_COUNT;
-   return 1;
-   }
-}
-
-
-static int nsp_release_old(struct Scsi_Host *shpnt)
-{
-   //nsp_hw_data *data = (nsp_hw_data *)shpnt-hostdata;
-
-   /* PCMCIA Card Service dose same things below. */
-   /* So we do nothing.   */
-   //if (shpnt-irq) {
-   //  free_irq(shpnt-irq, data-ScsiInfo);
-   //}
-   //if (shpnt-io_port) {
-   //  release_region(shpnt-io_port, shpnt-n_io_port);
-   //}
-
-   //MOD_DEC_USE_COUNT;
-
-   return 0;
-}
-#endif
-
 /**/
 /* return info string*/
 /**/
@@ -1403,19 +1359,9 @@
nsp_dbg(NSP_DEBUG_PROC, buffer=0x%p pos=0x%p length=%d 
%d\n, buffer, pos, length,  length - (pos - buffer));\
} \
} while(0)
-static int
-nsp_proc_info(
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73))
-   struct Scsi_Host *host,
-#endif
-   char  *buffer,
-   char **start,
-   off_t  offset,
-   intlength,
-#if !(LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73))
-   inthostno,
-#endif
-   intinout)
+
+static int nsp_proc_info(struct Scsi_Host *host, char *buffer, char **start,
+off_t offset, int length, int inout)
 {
int id;
char *pos = buffer;
@@ -1423,24 +1369,13 @@
int speed;
unsigned long flags;
nsp_hw_data *data;
-#if !(LINUX_VERSION_CODE

[RFC: 2.6 patch] drivers/scsi/ips.c: remove kernel 2.4 code

2007-03-25 Thread Adrian Bunk
This patch removes some kernel 2.4 code.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/ips.c |  145 +
 drivers/scsi/ips.h |   44 -
 2 files changed, 20 insertions(+), 169 deletions(-)

--- linux-2.6.21-rc4-mm1/drivers/scsi/ips.h.old 2007-03-25 20:10:28.0 
+0200
+++ linux-2.6.21-rc4-mm1/drivers/scsi/ips.h 2007-03-25 20:22:28.0 
+0200
@@ -58,10 +58,6 @@
/*
 * Some handy macros
 */
-   #if LINUX_VERSION_CODE = KERNEL_VERSION(2,4,20) || defined CONFIG_HIGHIO
-  #define IPS_HIGHIO
-   #endif
-
#define IPS_HA(x)   ((ips_ha_t *) x-hostdata)
#define IPS_COMMAND_ID(ha, scb) (int) (scb - ha-scbs)
#define IPS_IS_TROMBONE(ha) (((ha-device_id == 
IPS_DEVICEID_COPPERHEAD)  \
@@ -84,38 +80,8 @@
 #define IPS_SGLIST_SIZE(ha)   (IPS_USE_ENH_SGLIST(ha) ? \
  sizeof(IPS_ENH_SG_LIST) : 
sizeof(IPS_STD_SG_LIST))
 
-   #if LINUX_VERSION_CODE  KERNEL_VERSION(2,4,4)
-  #define pci_set_dma_mask(dev,mask) ( mask  0x ? 1:0 )
-  #define scsi_set_pci_device(sh,dev) (0)
-   #endif
-
-   #ifndef IRQ_NONE
-  typedef void irqreturn_t;
-  #define IRQ_NONE
-  #define IRQ_HANDLED
-  #define IRQ_RETVAL(x)
-   #endif
-   
-   #if LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0)
-  #define IPS_REGISTER_HOSTS(SHT)  
scsi_register_module(MODULE_SCSI_HA,SHT)
-  #define IPS_UNREGISTER_HOSTS(SHT)
scsi_unregister_module(MODULE_SCSI_HA,SHT)
-  #define IPS_ADD_HOST(shost,device)
-  #define IPS_REMOVE_HOST(shost)
-  #define IPS_SCSI_SET_DEVICE(sh,ha)   scsi_set_pci_device(sh, 
(ha)-pcidev)
-  #define IPS_PRINTK(level, pcidev, format, arg...) \
-printk(level %s %s: format , ips , \
-(pcidev)-slot_name , ## arg)
-  #define scsi_host_alloc(sh,size) scsi_register(sh,size)
-  #define scsi_host_put(sh) scsi_unregister(sh)
-   #else
-  #define IPS_REGISTER_HOSTS(SHT)  (!ips_detect(SHT))
-  #define IPS_UNREGISTER_HOSTS(SHT)
-  #define IPS_ADD_HOST(shost,device)   do { scsi_add_host(shost,device); 
scsi_scan_host(shost); } while (0)
-  #define IPS_REMOVE_HOST(shost)   scsi_remove_host(shost)
-  #define IPS_SCSI_SET_DEVICE(sh,ha)   do { } while (0)
-  #define IPS_PRINTK(level, pcidev, format, arg...) \
+  #define IPS_PRINTK(level, pcidev, format, arg...) \
 dev_printk(level , ((pcidev)-dev) , format , ## arg)
-   #endif
 
#define MDELAY(n)   \
do {\
@@ -134,7 +100,7 @@
#define pci_dma_hi32(a) ((a  16)  16)
#define pci_dma_lo32(a) (a  0x)
 
-   #if (BITS_PER_LONG  32) || (defined CONFIG_HIGHMEM64G  defined 
IPS_HIGHIO)
+   #if (BITS_PER_LONG  32) || defined(CONFIG_HIGHMEM64G)
   #define IPS_ENABLE_DMA64(1)
#else
   #define IPS_ENABLE_DMA64(0)
@@ -451,16 +417,10 @@
/*
 * Scsi_Host Template
 */
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0)
-   static int ips_proc24_info(char *, char **, off_t, int, int, int);
-   static void ips_select_queue_depth(struct Scsi_Host *, struct scsi_device 
*);
-   static int ips_biosparam(Disk *disk, kdev_t dev, int geom[]);
-#else
static int ips_proc_info(struct Scsi_Host *, char *, char **, off_t, int, 
int);
static int ips_biosparam(struct scsi_device *sdev, struct block_device 
*bdev,
sector_t capacity, int geom[]);
static int ips_slave_configure(struct scsi_device *SDptr);
-#endif
 
 /*
  * Raid Command Formats
--- linux-2.6.21-rc4-mm1/drivers/scsi/ips.c.old 2007-03-25 20:11:39.0 
+0200
+++ linux-2.6.21-rc4-mm1/drivers/scsi/ips.c 2007-03-25 20:20:35.0 
+0200
@@ -211,19 +211,6 @@
 #warning This driver has only been tested on the x86/ia64/x86_64 platforms
 #endif
 
-#if LINUX_VERSION_CODE = KERNEL_VERSION(2,5,0)
-#include linux/blk.h
-#include sd.h
-#define IPS_LOCK_SAVE(lock,flags) spin_lock_irqsave(io_request_lock,flags)
-#define IPS_UNLOCK_RESTORE(lock,flags) 
spin_unlock_irqrestore(io_request_lock,flags)
-#ifndef __devexit_p
-#define __devexit_p(x) x
-#endif
-#else
-#define IPS_LOCK_SAVE(lock,flags) do{spin_lock(lock);(void)flags;}while(0)
-#define IPS_UNLOCK_RESTORE(lock,flags) 
do{spin_unlock(lock);(void)flags;}while(0)
-#endif
-
 #define IPS_DMA_DIR(scb) ((!scb-scsi_cmd || ips_is_passthru(scb-scsi_cmd) || 
\
  DMA_NONE == scb-scsi_cmd-sc_data_direction) ? \
  PCI_DMA_BIDIRECTIONAL : \
@@ -381,24 +368,13 @@
.eh_abort_handler   = ips_eh_abort,
.eh_host_reset_handler  = ips_eh_reset,
.proc_name  = ips,
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0)
.proc_info  = ips_proc_info,
.slave_configure= ips_slave_configure,
-#else

[2.6 patch] drivers/scsi/nsp32.c: remove kernel 2.4 code

2007-03-25 Thread Adrian Bunk
This patch removes kernel 2.4 code.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/nsp32.c |  109 +--
 1 file changed, 13 insertions(+), 96 deletions(-)

--- linux-2.6.21-rc4-mm1/drivers/scsi/nsp32.c.old   2007-03-25 
20:27:34.0 +0200
+++ linux-2.6.21-rc4-mm1/drivers/scsi/nsp32.c   2007-03-25 20:31:59.0 
+0200
@@ -49,10 +49,6 @@
 #include scsi/scsi_host.h
 #include scsi/scsi_ioctl.h
 
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,6,0))
-# include linux/blk.h
-#endif
-
 #include nsp32.h
 
 
@@ -199,17 +195,9 @@
 static void __exitexit_nsp32  (void);
 
 /* struct struct scsi_host_template */
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73))
 static int nsp32_proc_info   (struct Scsi_Host *, char *, char **, 
off_t, int, int);
-#else
-static int nsp32_proc_info   (char *, char **, off_t, int, int, int);
-#endif
 
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73))
 static int nsp32_detect  (struct pci_dev *pdev);
-#else
-static int nsp32_detect  (struct scsi_host_template *);
-#endif
 static int nsp32_queuecommand(struct scsi_cmnd *,
void (*done)(struct scsi_cmnd *));
 static const char *nsp32_info(struct Scsi_Host *);
@@ -296,15 +284,7 @@
.eh_abort_handler   = nsp32_eh_abort,
.eh_bus_reset_handler   = nsp32_eh_bus_reset,
.eh_host_reset_handler  = nsp32_eh_host_reset,
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,74))
-   .detect = nsp32_detect,
-   .release= nsp32_release,
-#endif
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,2))
-   .use_new_eh_code= 1,
-#else
 /* .highmem_io = 1, */
-#endif
 };
 
 #include nsp32_io.h
@@ -1210,13 +1190,9 @@
unsigned long flags;
int ret;
int handled = 0;
-
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0))
struct Scsi_Host *host = data-Host;
+
spin_lock_irqsave(host-host_lock, flags);
-#else
-   spin_lock_irqsave(io_request_lock, flags);
-#endif
 
/*
 * IRQ check, then enable IRQ mask
@@ -1480,11 +1456,7 @@
nsp32_write2(base, IRQ_CONTROL, 0);
 
  out2:
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,0))
spin_unlock_irqrestore(host-host_lock, flags);
-#else
-   spin_unlock_irqrestore(io_request_lock, flags);
-#endif
 
nsp32_dbg(NSP32_DEBUG_INTR, exit);
 
@@ -1499,28 +1471,15 @@
nsp32_dbg(NSP32_DEBUG_PROC, buffer=0x%p pos=0x%p 
length=%d %d\n, buffer, pos, length,  length - (pos - buffer));\
} \
} while(0)
-static int nsp32_proc_info(
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73)) 
-   struct Scsi_Host *host,
-#endif
-   char *buffer,
-   char**start,
-   off_t offset,
-   int   length,
-#if !(LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73)) 
-   int   hostno,
-#endif
-   int   inout)
+
+static int nsp32_proc_info(struct Scsi_Host *host, char *buffer, char **start,
+  off_t offset, int length, int inout)
 {
char *pos = buffer;
int   thislength;
unsigned long flags;
nsp32_hw_data*data;
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73)) 
int   hostno;
-#else
-   struct Scsi_Host *host;
-#endif
unsigned int  base;
unsigned char mode_reg;
int   id, speed;
@@ -1531,15 +1490,7 @@
return -EINVAL;
}
 
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73)) 
hostno = host-host_no;
-#else
-   /* search this HBA host */
-   host = scsi_host_hn_get(hostno);
-   if (host == NULL) {
-   return -ESRCH;
-   }
-#endif
data = (nsp32_hw_data *)host-hostdata;
base = host-io_port;
 
@@ -2674,17 +2625,7 @@
  * 0x900-0xbff: (map same 0x800-0x8ff I/O port image repeatedly)
  * 0xc00-0xfff: CardBus status registers
  */
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73))
-#define DETECT_OK 0
-#define DETECT_NG 1
-#define PCIDEVpdev
 static int nsp32_detect(struct pci_dev *pdev)
-#else
-#define DETECT_OK 1
-#define DETECT_NG 0
-#define PCIDEV(data-Pci)
-static int nsp32_detect(struct scsi_host_template *sht)
-#endif
 {
struct Scsi_Host *host; /* registered host structure */
struct resource  *res;
@@ -2697,11 +2638,7 @@
/*
 * register this HBA as SCSI device
 */
-#if (LINUX_VERSION_CODE  KERNEL_VERSION(2,5,73))
host = scsi_host_alloc(nsp32_template, sizeof(nsp32_hw_data));
-#else
-   host = scsi_register(sht, sizeof(nsp32_hw_data));
-#endif
if (host == NULL) {
nsp32_msg (KERN_ERR, failed to scsi register);
goto err;
@@ -2719,9 +2656,6 @@
host

[-mm patch] drivers/scsi/constants.c: make 2 functions static

2007-03-24 Thread Adrian Bunk
On Mon, Mar 19, 2007 at 08:56:23PM -0800, Andrew Morton wrote:
...
 Changes since 2.6.21-rc3-mm1:
...
  git-scsi-misc.patch
...
  git trees
...


This patch makes two needlessly global functions static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/constants.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.21-rc4-mm1/drivers/scsi/constants.c.old   2007-03-23 
23:26:39.0 +0100
+++ linux-2.6.21-rc4-mm1/drivers/scsi/constants.c   2007-03-23 
23:26:55.0 +0100
@@ -1235,7 +1235,7 @@
 }
 EXPORT_SYMBOL(scsi_print_sense_hdr);
 
-void
+static void
 scsi_decode_sense_buffer(const unsigned char *sense_buffer, int sense_len,
   struct scsi_sense_hdr *sshdr)
 {
@@ -1258,7 +1258,7 @@
}
 }
 
-void
+static void
 scsi_decode_sense_extras(const unsigned char *sense_buffer, int sense_len,
 struct scsi_sense_hdr *sshdr)
 {

-
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: [-mm patch] drivers/scsi/constants.c: make 2 functions static

2007-03-24 Thread Adrian Bunk
On Sat, Mar 24, 2007 at 12:11:05PM -0400, Douglas Gilbert wrote:
 Adrian Bunk wrote:
  On Mon, Mar 19, 2007 at 08:56:23PM -0800, Andrew Morton wrote:
  ...
  Changes since 2.6.21-rc3-mm1:
  ...
   git-scsi-misc.patch
  ...
   git trees
  ...
  
  
  This patch makes two needlessly global functions static.
  
  Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
  
  ---
  
   drivers/scsi/constants.c |4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)
  
  --- linux-2.6.21-rc4-mm1/drivers/scsi/constants.c.old   2007-03-23 
  23:26:39.0 +0100
  +++ linux-2.6.21-rc4-mm1/drivers/scsi/constants.c   2007-03-23 
  23:26:55.0 +0100
  @@ -1235,7 +1235,7 @@
   }
   EXPORT_SYMBOL(scsi_print_sense_hdr);
   
  -void
  +static void
   scsi_decode_sense_buffer(const unsigned char *sense_buffer, int sense_len,
 struct scsi_sense_hdr *sshdr)
   {
  @@ -1258,7 +1258,7 @@
  }
   }
   
  -void
  +static void
   scsi_decode_sense_extras(const unsigned char *sense_buffer, int sense_len,
   struct scsi_sense_hdr *sshdr)
   {
 
 Adrian,
 Who put those functions in?



[SCSI] constants.c: cleanup, verbose result printing

From: Martin K. Petersen

Clean up constants.c and make result printing more user friendly:

 - Refactor the command and sense functions so that the actual
   formatting can be called from the various helper functions with the
   correct prefix.

 - Replace scsi_print_hostbyte() and scsi_print_driverbyte() with
   scsi_print_result() which is verbose when CONFIG_SCSI_CONSTANTS is
   on.

Signed-off-by: Martin K. Petersen [EMAIL PROTECTED]
Signed-off-by: James Bottomley [EMAIL PROTECTED]



 The names and arguments look very similar to these
 exported functions in scsi_error.c *** :
   scsi_normalize_sense
   scsi_sense_desc_find
   scsi_get_sense_info_fld
 
 that I can see in 2.6.21-rc4
 
 The proposed scsi_decode_sense_buffer() looks broken because
 it can fail and should return an int reflecting that.
 How scsi_decode_sense_extras() works is intriguing, unless
 struct scsi_sense_hdr has been changed as well.
 
 
 *** Putting sense decode logic in scsi_error.c is wrong
 because:
   - the ATA command set is proposing an ATA REQUEST SENSE
 command to yield a sense buffer
   - sense buffers don't necessarily indicate errors.
 
 So moving those functions out of scsi_error.c IMO is a
 good idea. Breaking them in the move isn't.
 
 Doug Gilbert
 

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


drivers/message/fusion/mptscsih.c: inconsequent NULL checking

2007-03-19 Thread Adrian Bunk
The Coverity checker spotted the following inconsequent NULL checking in 
drivers/message/fusion/mptscsih.c:

--  snip  --

...
int
mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
{
...
if (vdev
 (vdev-vtarget-tflags  MPT_TARGET_FLAGS_Q_YES)
 (SCpnt-device-tagged_supported)) { 
scsictl = scsidir | MPI_SCSIIO_CONTROL_SIMPLEQ;
} else {
scsictl = scsidir | MPI_SCSIIO_CONTROL_UNTAGGED; 
}
 
/* Use the above information to set up the message frame
 */
pScsiReq-TargetID = (u8) vdev-vtarget-id;
...

--  snip  --

vdev is first checked but later dereferenced unconditionally.

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


drivers/message/fusion/mptsas.c: inconsequent NULL checking

2007-03-19 Thread Adrian Bunk
The Coverity checker spotted the following inconsequent NULL checking in
drivers/message/fusion/mptsas.c:

--  snip  --

...
static void
mptsas_delete_expander_phys(MPT_ADAPTER *ioc)
{
...
if (port_info-phy_info 
(!(port_info-phy_info[0].identify.device_info 
MPI_SAS_DEVICE_INFO_SMP_TARGET)))
continue;

if (mptsas_sas_expander_pg0(ioc, buffer,
 (MPI_SAS_EXPAND_PGAD_FORM_HANDLE 
 MPI_SAS_EXPAND_PGAD_FORM_SHIFT),
 port_info-phy_info[0].handle)) {
...

--  snip  --

port_info-phy_info is first checked but later dereferenced 
unconditionally.

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


[RFC: 2.6 patch] remove the broken SCSI_ACORNSCSI_3 driver

2007-02-19 Thread Adrian Bunk
The SCSI_ACORNSCSI_3 driver:
- has been marked as BROKEN for more than one year and
- is still marked as BROKEN.

Drivers that had been marked as BROKEN for such a long time seem to be
unlikely to be revived in the forseeable future.

But if anyone wants to ever revive this driver, the code is still
present in the older kernel releases.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 21 Jan 2007
- 6 Jan 2007

Due to it's size, the compressed patch is attached.

 drivers/scsi/arm/Kconfig|   29 
 drivers/scsi/arm/Makefile   |3 
 drivers/scsi/arm/acornscsi-io.S |  145 -
 drivers/scsi/arm/acornscsi.c| 3130 
 drivers/scsi/arm/acornscsi.h|  358 ---
 5 files changed, 3665 deletions(-)


patch-remove-SCSI_ACORNSCSI_3.gz
Description: Binary data


[-mm patch] drivers/scsi/aacraid/: cleanups

2007-02-06 Thread Adrian Bunk
On Mon, Jan 29, 2007 at 08:45:28PM -0800, Andrew Morton wrote:
...
 Changes since 2.6.20-rc6-mm2:
...
  git-scsi-misc.patch
...
  git trees
...


This patch contains the following cleanups:
- proper prototypes for global code in aacraid.h
- aac_rx_start_adapter() can now become static

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/aacraid/aacraid.h |3 +++
 drivers/scsi/aacraid/linit.c   |2 --
 drivers/scsi/aacraid/nark.c|3 ---
 drivers/scsi/aacraid/rkt.c |3 ---
 drivers/scsi/aacraid/rx.c  |2 +-
 5 files changed, 4 insertions(+), 9 deletions(-)

--- linux-2.6.20-rc6-mm3/drivers/scsi/aacraid/aacraid.h.old 2007-02-06 
08:22:50.0 +0100
+++ linux-2.6.20-rc6-mm3/drivers/scsi/aacraid/aacraid.h 2007-02-06 
08:27:17.0 +0100
@@ -1840,8 +1840,11 @@
 int aac_get_adapter_info(struct aac_dev* dev);
 int aac_send_shutdown(struct aac_dev *dev);
 int aac_probe_container(struct aac_dev *dev, int cid);
+int _aac_rx_init(struct aac_dev *dev);
+int aac_rx_select_comm(struct aac_dev *dev, int comm);
 extern int numacb;
 extern int acbsize;
 extern char aac_driver_version[];
 extern int startup_timeout;
 extern int aif_timeout;
+extern int expose_physicals;
--- linux-2.6.20-rc6-mm3/drivers/scsi/aacraid/rx.c.old  2007-02-06 
08:21:40.0 +0100
+++ linux-2.6.20-rc6-mm3/drivers/scsi/aacraid/rx.c  2007-02-06 
08:21:50.0 +0100
@@ -294,7 +294,7 @@
  * Start up processing on an i960 based AAC adapter
  */
 
-void aac_rx_start_adapter(struct aac_dev *dev)
+static void aac_rx_start_adapter(struct aac_dev *dev)
 {
struct aac_init *init;
 
--- linux-2.6.20-rc6-mm3/drivers/scsi/aacraid/linit.c.old   2007-02-06 
08:23:20.0 +0100
+++ linux-2.6.20-rc6-mm3/drivers/scsi/aacraid/linit.c   2007-02-06 
08:23:26.0 +0100
@@ -82,8 +82,6 @@
 static int aac_cfg_major = -1;
 char aac_driver_version[] = AAC_DRIVER_FULL_VERSION;
 
-extern int expose_physicals;
-
 /*
  * Because of the way Linux names scsi devices, the order in this table has
  * become important.  Check for on-board Raid first, add-in cards second.
--- linux-2.6.20-rc6-mm3/drivers/scsi/aacraid/nark.c.old2007-02-06 
08:24:47.0 +0100
+++ linux-2.6.20-rc6-mm3/drivers/scsi/aacraid/nark.c2007-02-06 
08:24:58.0 +0100
@@ -74,9 +74,6 @@
 
 int aac_nark_init(struct aac_dev * dev)
 {
-   extern int _aac_rx_init(struct aac_dev *dev);
-   extern int aac_rx_select_comm(struct aac_dev *dev, int comm);
-
/*
 *  Fill in the function dispatch table.
 */
--- linux-2.6.20-rc6-mm3/drivers/scsi/aacraid/rkt.c.old 2007-02-06 
08:25:07.0 +0100
+++ linux-2.6.20-rc6-mm3/drivers/scsi/aacraid/rkt.c 2007-02-06 
08:25:20.0 +0100
@@ -45,7 +45,6 @@
 static int aac_rkt_select_comm(struct aac_dev *dev, int comm)
 {
int retval;
-   extern int aac_rx_select_comm(struct aac_dev *dev, int comm);
retval = aac_rx_select_comm(dev, comm);
if (comm == AAC_COMM_MESSAGE) {
/*
@@ -97,8 +96,6 @@
 
 int aac_rkt_init(struct aac_dev *dev)
 {
-   extern int _aac_rx_init(struct aac_dev *dev);
-
/*
 *  Fill in the function dispatch table.
 */

-
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 patch] SCSI seagate.c: remove SEAGATE_USE_ASM

2007-01-22 Thread Adrian Bunk
On Mon, Jan 22, 2007 at 03:18:41PM +, Alan wrote:
 On Sun, 21 Jan 2007 20:13:00 +0100
 Adrian Bunk [EMAIL PROTECTED] wrote:
 
  Using assembler code for performance in drivers might have been a good 
  idea 15 years ago when this code was written, but with today's compilers 
  that's unlikely to be an advantage.
  
  Besides this, it also hurts the readability.
  
  Simply use the C code that was already there as an alternative.
  
  Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
   stosb\n\t
 
 NAK
 
 The C codepaths are essentially untested on this driver.

Has any part of this driver ever be tested with kernel 2.6?
Or compiled with gcc 4?

 Alan

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


[2.6 patch] make seagate_st0x_detect() static

2007-01-21 Thread Adrian Bunk
seagate_st0x_detect() can become static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 6 Jan 2007

--- linux-2.6.20-rc3-mm1/drivers/scsi/seagate.c.old 2007-01-05 
22:53:13.0 +0100
+++ linux-2.6.20-rc3-mm1/drivers/scsi/seagate.c 2007-01-05 22:57:54.0 
+0100
@@ -420,7 +420,7 @@
 #define ULOOP( i ) for (clock = i*8;;)
 #define TIMEOUT (!(clock--))
 
-int __init seagate_st0x_detect (struct scsi_host_template * tpnt)
+static int __init seagate_st0x_detect (struct scsi_host_template * tpnt)
 {
struct Scsi_Host *instance;
int i, j;

-
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 patch] SCSI seagate.c: remove SEAGATE_USE_ASM

2007-01-21 Thread Adrian Bunk
Using assembler code for performance in drivers might have been a good 
idea 15 years ago when this code was written, but with today's compilers 
that's unlikely to be an advantage.

Besides this, it also hurts the readability.

Simply use the C code that was already there as an alternative.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 6 Jan 2007

 drivers/scsi/Makefile  |2 
 drivers/scsi/seagate.c |  148 -
 2 files changed, 1 insertion(+), 149 deletions(-)

--- linux-2.6.20-rc3-mm1/drivers/scsi/Makefile.old  2007-01-05 
23:01:12.0 +0100
+++ linux-2.6.20-rc3-mm1/drivers/scsi/Makefile  2007-01-05 23:01:51.0 
+0100
@@ -16,7 +16,7 @@
 
 CFLAGS_aha152x.o =   -DAHA152X_STAT -DAUTOCONF
 CFLAGS_gdth.o= # -DDEBUG_GDTH=2 -D__SERIAL__ -D__COM2__ -DGDTH_STATISTICS
-CFLAGS_seagate.o =   -DARBITRATE -DPARITY -DSEAGATE_USE_ASM
+CFLAGS_seagate.o =   -DARBITRATE -DPARITY
 
 subdir-$(CONFIG_PCMCIA)+= pcmcia
 
--- linux-2.6.20-rc3-mm1/drivers/scsi/seagate.c.old 2007-01-05 
23:02:03.0 +0100
+++ linux-2.6.20-rc3-mm1/drivers/scsi/seagate.c 2007-01-05 23:03:11.0 
+0100
@@ -60,10 +60,6 @@
  * -DPARITY  
  *  This will enable parity.
  *
- * -DSEAGATE_USE_ASM
- *  Will use older seagate assembly code. should be (very small amount)
- *  Faster.
- *
  * -DSLOW_RATE=50
  *  Will allow compatibility with broken devices that don't
  *  handshake fast enough (ie, some CD ROM's) for the Seagate
@@ -132,10 +128,6 @@
 #error Please use -DCONTROLLER=SEAGATE or -DCONTROLLER=FD to override 
controller type
 #endif
 
-#ifndef __i386__
-#undef SEAGATE_USE_ASM
-#endif
-
 /*
Thanks to Brian Antoine for the example code in his Messy-Loss ST-01
driver, and Mitsugu Suzuki for information on the ST-01
@@ -539,9 +531,6 @@
 #ifdef PARITY
 PARITY
 #endif
-#ifdef SEAGATE_USE_ASM
-SEAGATE_USE_ASM
-#endif
 #ifdef SLOW_RATE
 SLOW_RATE
 #endif
@@ -1139,30 +1128,7 @@
 data);
 
/* SJT: Start. Fast Write */
-#ifdef SEAGATE_USE_ASM
-   __asm__ (cld\n\t
-#ifdef FAST32
-shr $2, %%ecx\n\t
-1:\t
-lodsl\n\t
-movl %%eax, (%%edi)\n\t
-#else
-1:\t
-lodsb\n\t
-movb %%al, (%%edi)\n\t
-#endif
-loop 1b;
- /* output */ :
- /* input */ :D (st0x_dr),
-S
-(data),
-c (SCint-transfersize)
-/* clobbered */
- :  eax, ecx,
-esi);
-#else  /* SEAGATE_USE_ASM */
memcpy_toio(st0x_dr, data, 
transfersize);
-#endif /* SEAGATE_USE_ASM */
 /* SJT: End */
len -= transfersize;
data += transfersize;
@@ -1175,49 +1141,6 @@
 */
 
 /* SJT: Start. Slow Write. */
-#ifdef SEAGATE_USE_ASM
-
-   int __dummy_1, __dummy_2;
-
-/*
- *  We loop as long as we are in a data out phase, there is data to send, 
- *  and BSY is still active.
- */
-/* Local variables : len = ecx , data = esi, 
- st0x_cr_sr = ebx, st0x_dr =  edi
-*/
-   __asm__ (
-   /* Test for any data 
here at all. */
-   orl %%ecx, %%ecx\n\t
-   jz 2f\n\t cld\n\t
-/*movl st0x_cr_sr, %%ebx\n\t  */
-/*movl st0x_dr, %%edi\n\t  */
-   1:\t
-   movb (%%ebx), %%al\n\t
-   /* Test for BSY */
-   test $1, %%al\n\t
-   jz 2f\n\t
-   /* Test for data out 
phase - STATUS  REQ_MASK should be 
-  REQ_DATAOUT, which 
is 0. */
-   test $0xe

[RFC: 2.6 patch] remove the broken SCSI_ACORNSCSI_3 driver

2007-01-21 Thread Adrian Bunk
The SCSI_ACORNSCSI_3 driver:
- has been marked as BROKEN for more than one year and
- is still marked as BROKEN.

Drivers that had been marked as BROKEN for such a long time seem to be
unlikely to be revived in the forseeable future.

But if anyone wants to ever revive this driver, the code is still
present in the older kernel releases.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 6 Jan 2007

Due to it's size, the compressed patch is attached.

 drivers/scsi/arm/Kconfig|   29 
 drivers/scsi/arm/Makefile   |3 
 drivers/scsi/arm/acornscsi-io.S |  145 -
 drivers/scsi/arm/acornscsi.c| 3130 
 drivers/scsi/arm/acornscsi.h|  358 ---
 5 files changed, 3665 deletions(-)


patch-remove-SCSI_ACORNSCSI_3.gz
Description: Binary data


[RFC: 2.6 patch] drivers/scsi/qla4xxx/: possible cleanups

2007-01-14 Thread Adrian Bunk
This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 unused functions

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/qla4xxx/ql4_dbg.c  |4 
 drivers/scsi/qla4xxx/ql4_glbl.h |9 -
 drivers/scsi/qla4xxx/ql4_init.c |   18 +-
 drivers/scsi/qla4xxx/ql4_iocb.c |   18 +-
 drivers/scsi/qla4xxx/ql4_mbx.c  |   19 ++-
 drivers/scsi/qla4xxx/ql4_os.c   |9 -
 6 files changed, 40 insertions(+), 37 deletions(-)

--- linux-2.6.20-rc4-mm1/drivers/scsi/qla4xxx/ql4_dbg.c.old 2007-01-14 
10:21:51.0 +0100
+++ linux-2.6.20-rc4-mm1/drivers/scsi/qla4xxx/ql4_dbg.c 2007-01-14 
14:11:11.0 +0100
@@ -8,6 +8,8 @@
 #include ql4_def.h
 #include scsi/scsi_dbg.h
 
+#if 0
+
 static void qla4xxx_print_srb_info(struct srb * srb)
 {
printk(%s: srb = 0x%p, flags=0x%02x\n, __func__, srb, srb-flags);
@@ -195,3 +197,5 @@
if (cnt % 16)
printk(KERN_DEBUG \n);
 }
+
+#endif  /*  0  */
--- linux-2.6.20-rc4-mm1/drivers/scsi/qla4xxx/ql4_glbl.h.old2007-01-14 
10:25:16.0 +0100
+++ linux-2.6.20-rc4-mm1/drivers/scsi/qla4xxx/ql4_glbl.h2007-01-14 
14:10:38.0 +0100
@@ -43,8 +43,6 @@
uint16_t *tcp_source_port_num,
uint16_t *connection_id);
 
-struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host * ha,
-uint32_t fw_ddb_index);
 int qla4xxx_set_ddb_entry(struct scsi_qla_host * ha, uint16_t fw_ddb_index,
  dma_addr_t fw_ddb_entry_dma);
 
@@ -55,18 +53,11 @@
 struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha);
 int qla4xxx_add_sess(struct ddb_entry *);
 void qla4xxx_destroy_sess(struct ddb_entry *ddb_entry);
-int qla4xxx_conn_close_sess_logout(struct scsi_qla_host * ha,
-  uint16_t fw_ddb_index,
-  uint16_t connection_id,
-  uint16_t option);
-int qla4xxx_clear_database_entry(struct scsi_qla_host * ha,
-uint16_t fw_ddb_index);
 int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host * ha);
 int qla4xxx_get_fw_version(struct scsi_qla_host * ha);
 void qla4xxx_interrupt_service_routine(struct scsi_qla_host * ha,
   uint32_t intr_status);
 int qla4xxx_init_rings(struct scsi_qla_host * ha);
-void qla4xxx_dump_buffer(void *b, uint32_t size);
 struct srb * qla4xxx_del_from_active_array(struct scsi_qla_host *ha, uint32_t 
index);
 void qla4xxx_srb_compl(struct scsi_qla_host *ha, struct srb *srb);
 int qla4xxx_reinitialize_ddb_list(struct scsi_qla_host * ha);
--- linux-2.6.20-rc4-mm1/drivers/scsi/qla4xxx/ql4_init.c.old2007-01-14 
10:25:31.0 +0100
+++ linux-2.6.20-rc4-mm1/drivers/scsi/qla4xxx/ql4_init.c2007-01-14 
10:27:40.0 +0100
@@ -7,9 +7,8 @@
 
 #include ql4_def.h
 
-/*
- * QLogic ISP4xxx Hardware Support Function Prototypes.
- */
+static struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha,
+   uint32_t fw_ddb_index);
 
 static void ql4xxx_set_mac_number(struct scsi_qla_host *ha)
 {
@@ -48,7 +47,8 @@
  * This routine deallocates and unlinks the specified ddb_entry from the
  * adapter's
  **/
-void qla4xxx_free_ddb(struct scsi_qla_host *ha, struct ddb_entry *ddb_entry)
+static void qla4xxx_free_ddb(struct scsi_qla_host *ha,
+struct ddb_entry *ddb_entry)
 {
/* Remove device entry from list */
list_del_init(ddb_entry-list);
@@ -370,9 +370,9 @@
  * must be initialized prior tocalling this routine
  *
  **/
-int qla4xxx_update_ddb_entry(struct scsi_qla_host *ha,
-struct ddb_entry *ddb_entry,
-uint32_t fw_ddb_index)
+static int qla4xxx_update_ddb_entry(struct scsi_qla_host *ha,
+   struct ddb_entry *ddb_entry,
+   uint32_t fw_ddb_index)
 {
struct dev_db_entry *fw_ddb_entry = NULL;
dma_addr_t fw_ddb_entry_dma;
@@ -450,8 +450,8 @@
  * This routine allocates a ddb_entry, ititializes some values, and
  * inserts it into the ddb list.
  **/
-struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha,
-uint32_t fw_ddb_index)
+static struct ddb_entry * qla4xxx_alloc_ddb(struct scsi_qla_host *ha,
+   uint32_t fw_ddb_index)
 {
struct ddb_entry *ddb_entry;
 
--- linux-2.6.20-rc4-mm1/drivers/scsi/qla4xxx/ql4_iocb.c.old2007-01-14 
10:29:58.0 +0100
+++ linux-2.6.20-rc4-mm1/drivers/scsi/qla4xxx/ql4_iocb.c2007-01-14 
10:34:46.0 +0100
@@ -19,8 +19,8 @@
  * - advances the request_in pointer
  * - checks for queue full
  **/
-int qla4xxx_get_req_pkt(struct scsi_qla_host *ha

[RFC: 2.6 patch] remove the broken SCSI_ACORNSCSI_3 driver

2007-01-06 Thread Adrian Bunk
The SCSI_ACORNSCSI_3 driver:
- has been marked as BROKEN for more than one year and
- is still marked as BROKEN.

Drivers that had been marked as BROKEN for such a long time seem to be
unlikely to be revived in the forseeable future.

But if anyone wants to ever revive this driver, the code is still
present in the older kernel releases.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

Due to it's size, the compressed patch is attached.

 drivers/scsi/arm/Kconfig|   29 
 drivers/scsi/arm/Makefile   |3 
 drivers/scsi/arm/acornscsi-io.S |  145 -
 drivers/scsi/arm/acornscsi.c| 3130 
 drivers/scsi/arm/acornscsi.h|  358 ---
 5 files changed, 3665 deletions(-)



patch-remove-SCSI_ACORNSCSI_3.gz
Description: Binary data


[2.6 patch] make seagate_st0x_detect() static

2007-01-05 Thread Adrian Bunk
seagate_st0x_detect() can become static.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

--- linux-2.6.20-rc3-mm1/drivers/scsi/seagate.c.old 2007-01-05 
22:53:13.0 +0100
+++ linux-2.6.20-rc3-mm1/drivers/scsi/seagate.c 2007-01-05 22:57:54.0 
+0100
@@ -420,7 +420,7 @@
 #define ULOOP( i ) for (clock = i*8;;)
 #define TIMEOUT (!(clock--))
 
-int __init seagate_st0x_detect (struct scsi_host_template * tpnt)
+static int __init seagate_st0x_detect (struct scsi_host_template * tpnt)
 {
struct Scsi_Host *instance;
int i, j;

-
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 patch] SCSI seagate.c: remove SEAGATE_USE_ASM

2007-01-05 Thread Adrian Bunk
Using assembler code for performance in drivers might have been a good 
idea 15 years ago when this code was written, but with today's compilers 
that's unlikely to be an advantage.

Besides this, it also hurts the readability.

Simply use the C code that was already there as an alternative.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/Makefile  |2 
 drivers/scsi/seagate.c |  148 -
 2 files changed, 1 insertion(+), 149 deletions(-)

--- linux-2.6.20-rc3-mm1/drivers/scsi/Makefile.old  2007-01-05 
23:01:12.0 +0100
+++ linux-2.6.20-rc3-mm1/drivers/scsi/Makefile  2007-01-05 23:01:51.0 
+0100
@@ -16,7 +16,7 @@
 
 CFLAGS_aha152x.o =   -DAHA152X_STAT -DAUTOCONF
 CFLAGS_gdth.o= # -DDEBUG_GDTH=2 -D__SERIAL__ -D__COM2__ -DGDTH_STATISTICS
-CFLAGS_seagate.o =   -DARBITRATE -DPARITY -DSEAGATE_USE_ASM
+CFLAGS_seagate.o =   -DARBITRATE -DPARITY
 
 subdir-$(CONFIG_PCMCIA)+= pcmcia
 
--- linux-2.6.20-rc3-mm1/drivers/scsi/seagate.c.old 2007-01-05 
23:02:03.0 +0100
+++ linux-2.6.20-rc3-mm1/drivers/scsi/seagate.c 2007-01-05 23:03:11.0 
+0100
@@ -60,10 +60,6 @@
  * -DPARITY  
  *  This will enable parity.
  *
- * -DSEAGATE_USE_ASM
- *  Will use older seagate assembly code. should be (very small amount)
- *  Faster.
- *
  * -DSLOW_RATE=50
  *  Will allow compatibility with broken devices that don't
  *  handshake fast enough (ie, some CD ROM's) for the Seagate
@@ -132,10 +128,6 @@
 #error Please use -DCONTROLLER=SEAGATE or -DCONTROLLER=FD to override 
controller type
 #endif
 
-#ifndef __i386__
-#undef SEAGATE_USE_ASM
-#endif
-
 /*
Thanks to Brian Antoine for the example code in his Messy-Loss ST-01
driver, and Mitsugu Suzuki for information on the ST-01
@@ -539,9 +531,6 @@
 #ifdef PARITY
 PARITY
 #endif
-#ifdef SEAGATE_USE_ASM
-SEAGATE_USE_ASM
-#endif
 #ifdef SLOW_RATE
 SLOW_RATE
 #endif
@@ -1139,30 +1128,7 @@
 data);
 
/* SJT: Start. Fast Write */
-#ifdef SEAGATE_USE_ASM
-   __asm__ (cld\n\t
-#ifdef FAST32
-shr $2, %%ecx\n\t
-1:\t
-lodsl\n\t
-movl %%eax, (%%edi)\n\t
-#else
-1:\t
-lodsb\n\t
-movb %%al, (%%edi)\n\t
-#endif
-loop 1b;
- /* output */ :
- /* input */ :D (st0x_dr),
-S
-(data),
-c (SCint-transfersize)
-/* clobbered */
- :  eax, ecx,
-esi);
-#else  /* SEAGATE_USE_ASM */
memcpy_toio(st0x_dr, data, 
transfersize);
-#endif /* SEAGATE_USE_ASM */
 /* SJT: End */
len -= transfersize;
data += transfersize;
@@ -1175,49 +1141,6 @@
 */
 
 /* SJT: Start. Slow Write. */
-#ifdef SEAGATE_USE_ASM
-
-   int __dummy_1, __dummy_2;
-
-/*
- *  We loop as long as we are in a data out phase, there is data to send, 
- *  and BSY is still active.
- */
-/* Local variables : len = ecx , data = esi, 
- st0x_cr_sr = ebx, st0x_dr =  edi
-*/
-   __asm__ (
-   /* Test for any data 
here at all. */
-   orl %%ecx, %%ecx\n\t
-   jz 2f\n\t cld\n\t
-/*movl st0x_cr_sr, %%ebx\n\t  */
-/*movl st0x_dr, %%edi\n\t  */
-   1:\t
-   movb (%%ebx), %%al\n\t
-   /* Test for BSY */
-   test $1, %%al\n\t
-   jz 2f\n\t
-   /* Test for data out 
phase - STATUS  REQ_MASK should be 
-  REQ_DATAOUT, which 
is 0. */
-   test $0xe, %%al\n\t

[RFC: 2.6 patch] remove the broken SCSI_AMIGA7XX driver

2007-01-04 Thread Adrian Bunk
The SCSI_AMIGA7XX driver:
- has been marked as BROKEN for more than two years and
- is still marked as BROKEN.

Drivers that had been marked as BROKEN for such a long time seem to be
unlikely to be revived in the forseeable future.

But if anyone wants to ever revive this driver, the code is still
present in the older kernel releases.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

 drivers/scsi/Kconfig|   21 --
 drivers/scsi/Makefile   |1 
 drivers/scsi/amiga7xx.c |  139 
 drivers/scsi/amiga7xx.h |   23 --
 4 files changed, 1 insertion(+), 183 deletions(-)

--- linux-2.6.20-rc2-mm1/drivers/scsi/Kconfig.old   2007-01-04 
19:16:49.0 +0100
+++ linux-2.6.20-rc2-mm1/drivers/scsi/Kconfig   2007-01-04 19:29:19.0 
+0100
@@ -1609,25 +1609,6 @@
  If you have the Phase5 Fastlane Z3 SCSI controller, or plan to use
  one in the near future, say Y to this question. Otherwise, say N.
 
-config SCSI_AMIGA7XX
-   bool Amiga NCR53c710 SCSI support (EXPERIMENTAL)
-   depends on AMIGA  SCSI  EXPERIMENTAL  BROKEN
-   help
- Support for various NCR53c710-based SCSI controllers on the Amiga.
- This includes:
-   - the builtin SCSI controller on the Amiga 4000T,
-   - the Amiga 4091 Zorro III SCSI-2 controller,
-   - the MacroSystem Development's WarpEngine Amiga SCSI-2 controller
- (info at
- http://www.lysator.liu.se/amiga/ar/guide/ar310.guide?FEATURE5),
-   - the SCSI controller on the Phase5 Blizzard PowerUP 603e+
- accelerator card for the Amiga 1200,
-   - the SCSI controller on the GVP Turbo 040/060 accelerator.
- Note that all of the above SCSI controllers, except for the builtin
- SCSI controller on the Amiga 4000T, reside on the Zorro expansion
- bus, so you also have to enable Zorro bus support if you want to use
- them.
-
 config OKTAGON_SCSI
tristate BSC Oktagon SCSI support (EXPERIMENTAL)
depends on ZORRO  SCSI  EXPERIMENTAL
@@ -1729,7 +1710,7 @@
 
 config SCSI_NCR53C7xx_FAST
bool allow FAST-SCSI [10MHz]
-   depends on SCSI_AMIGA7XX || MVME16x_SCSI || BVME6000_SCSI
+   depends on MVME16x_SCSI || BVME6000_SCSI
help
  This will enable 10MHz FAST-SCSI transfers with your host
  adapter. Some systems have problems with that speed, so it's safest
--- linux-2.6.20-rc2-mm1/drivers/scsi/Makefile.old  2007-01-04 
19:29:27.0 +0100
+++ linux-2.6.20-rc2-mm1/drivers/scsi/Makefile  2007-01-04 19:29:47.0 
+0100
@@ -37,7 +37,6 @@
 
 obj-$(CONFIG_ISCSI_TCP)+= libiscsi.o   iscsi_tcp.o
 obj-$(CONFIG_INFINIBAND_ISER)  += libiscsi.o
-obj-$(CONFIG_SCSI_AMIGA7XX)+= amiga7xx.o   53c7xx.o
 obj-$(CONFIG_A3000_SCSI)   += a3000.o  wd33c93.o
 obj-$(CONFIG_A2091_SCSI)   += a2091.o  wd33c93.o
 obj-$(CONFIG_GVP11_SCSI)   += gvp11.o  wd33c93.o
--- linux-2.6.20-rc2-mm1/drivers/scsi/amiga7xx.h2006-11-29 
22:57:37.0 +0100
+++ /dev/null   2006-09-19 00:45:31.0 +0200
@@ -1,23 +0,0 @@
-#ifndef AMIGA7XX_H
-
-#include linux/types.h
-
-int amiga7xx_detect(struct scsi_host_template *);
-const char *NCR53c7x0_info(void);
-int NCR53c7xx_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
-int NCR53c7xx_abort(Scsi_Cmnd *);
-int NCR53c7x0_release (struct Scsi_Host *);
-int NCR53c7xx_reset(Scsi_Cmnd *, unsigned int);
-void NCR53c7x0_intr(int irq, void *dev_id);
-
-#ifndef CMD_PER_LUN
-#define CMD_PER_LUN 3
-#endif
-
-#ifndef CAN_QUEUE
-#define CAN_QUEUE 24
-#endif
-
-#include scsi/scsicam.h
-
-#endif /* AMIGA7XX_H */
--- linux-2.6.20-rc2-mm1/drivers/scsi/amiga7xx.c2006-11-29 
22:57:37.0 +0100
+++ /dev/null   2006-09-19 00:45:31.0 +0200
@@ -1,139 +0,0 @@
-/*
- * Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux.
- * Amiga MacroSystemUS WarpEngine SCSI controller.
- * Amiga Technologies A4000T SCSI controller.
- * Amiga Technologies/DKB A4091 SCSI controller.
- *
- * Written 1997 by Alan Hourihane [EMAIL PROTECTED]
- * plus modifications of the 53c7xx.c driver to support the Amiga.
- */
-#include linux/types.h
-#include linux/mm.h
-#include linux/blkdev.h
-#include linux/sched.h
-#include linux/zorro.h
-#include linux/stat.h
-
-#include asm/setup.h
-#include asm/page.h
-#include asm/pgtable.h
-#include asm/amigaints.h
-#include asm/amigahw.h
-#include asm/dma.h
-#include asm/irq.h
-
-#include scsi.h
-#include scsi/scsi_host.h
-#include 53c7xx.h
-#include amiga7xx.h
-
-
-static int amiga7xx_register_one(struct scsi_host_template *tpnt,
-unsigned long address)
-{
-long long options;
-int clock;
-
-if (!request_mem_region(address, 0x1000, ncr53c710))
-   return 0;
-
-address = (unsigned long)z_ioremap(address, 0x1000);
-options = OPTION_MEMORY_MAPPED

2.6.20-rc3: known unfixed regressions (v3)

2007-01-04 Thread Adrian Bunk
This email lists some known regressions in 2.6.20-rc3 compared to 2.6.19
that are not yet fixed in Linus' tree.

If you find your name in the Cc header, you are either submitter of one
of the bugs, maintainer of an affectected subsystem or driver, a patch
of you caused a breakage or I'm considering you in any other way possibly
involved with one or more of these issues.

Due to the huge amount of recipients, please trim the Cc when answering.


Subject: BUG: scheduling while atomic: hald-addon-stor/...
 cdrom_{open,release,ioctl} in trace
References : http://lkml.org/lkml/2006/12/26/105
 http://lkml.org/lkml/2006/12/29/22
 http://lkml.org/lkml/2006/12/31/133
Submitter  : Jon Smirl [EMAIL PROTECTED]
 Damien Wyart [EMAIL PROTECTED]
 Aaron Sethman [EMAIL PROTECTED]
Status : unknown


Subject: Acer Extensa 3002 WLMi: 'shutdown -h now' reboots the system
References : http://lkml.org/lkml/2006/12/25/40
Submitter  : Berthold Cogel [EMAIL PROTECTED]
Status : unknown


Subject: USB keyboard unresponsive after some time
References : http://lkml.org/lkml/2006/12/25/35
 http://lkml.org/lkml/2006/12/26/106
Submitter  : Florin Iucha [EMAIL PROTECTED]
Status : unknown


Subject: SPARC64: Can't mount /  (CONFIG_SCSI_SCAN_ASYNC=y ?)
References : http://lkml.org/lkml/2006/12/13/181
 http://lkml.org/lkml/2007/01/04/75
Submitter  : Horst H. von Brand [EMAIL PROTECTED]
Status : unknown


Subject: ftp: get or put stops during file-transfer
References : http://lkml.org/lkml/2006/12/16/174
Submitter  : Komuro [EMAIL PROTECTED]
Caused-By  : YOSHIFUJI Hideaki [EMAIL PROTECTED]
 commit cfb6eeb4c860592edd123fdea908d23c6ad1c7dc
Handled-By : YOSHIFUJI Hideaki [EMAIL PROTECTED]
Status : problem is being debugged


Subject: x86_64 boot failure: IO-APIC + timer doesn't work
References : http://lkml.org/lkml/2006/12/16/101
 http://lkml.org/lkml/2007/1/3/9
Submitter  : Tobias Diedrich [EMAIL PROTECTED]
Caused-By  : Andi Kleen [EMAIL PROTECTED]
 commit b026872601976f666bae77b609dc490d1834bf77
Handled-By : Yinghai Lu [EMAIL PROTECTED]
 Eric W. Biederman [EMAIL PROTECTED]
Status : patches are being discussed
-
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 patch] remove the broken SCSI_SEAGATE driver

2006-12-12 Thread Adrian Bunk
On Tue, Dec 12, 2006 at 05:31:14PM -0600, James Bottomley wrote:
 On Tue, 2006-12-12 at 17:22 +0100, Adrian Bunk wrote:
  The SCSI_SEAGATE driver has:
  - already been marked as BROKEN in 2.6.0 three years ago and
  - is still marked as BROKEN.
  
  Drivers that had been marked as BROKEN for such a long time seem to be
  unlikely to be revived in the forseeable future.
  
  But if anyone wants to ever revive this driver, the code is still
  present in the older kernel releases.
 
 Would you care to explain the rationale for this, please.  If the driver
 had been riddled with errors and compilation problems, I might have
 acquiesced, but now I come to look it over, it seems structurally
 reasonably OK (we certainly have non-BROKEN worse ones) plus it compiles
 fine.  So I'm wondering why it's marked broken in the first place.
 
 Since it was your original patch:
 
 Author: Adrian Bunk [EMAIL PROTECTED]
 Date:   Mon Sep 1 19:22:52 2003 -0700
 
 [PATCH] Mark more drivers BROKEN{,ON_SMP}
 
 - let more drivers that don't compile depend on BROKEN
 - MTD_BLKMTD is fixed, remove the dependency on BROKEN
 - let all drivers that don't compile on SMP (due to cli/sti usage)
   depend on a BROKEN_ON_SMP that is only defined if !SMP || BROKEN
 - #include interrupt.h for dummy cli/sti/... in two files to fix the
   UP compilation of these files
 
 I marked only drivers that are broken for a long time and where I don't
 know about existing fixes with BROKEN or BROKEN_ON_SMP.
 
 I'd like to know why it was marked BROKEN in the first place.


There must have been a compile error that has since been fixed, but I 
don't remember the details of this specific driver and I don't have 
such old compile logs anymore.


 Thanks,
 
 James

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


[2.6 patch] drivers/scsi/wd33c93.c: cleanups

2006-12-02 Thread Adrian Bunk
This patch contains the following cleanups:
- #include asm/irq.h for getting the prototypes of
  {dis,en}able_irq()
- make the needlessly global wd33c93_setup() static

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 4 Sep 2006

--- linux-2.6.18-rc5-mm1/drivers/scsi/wd33c93.c.old 2006-09-04 
01:45:57.0 +0200
+++ linux-2.6.18-rc5-mm1/drivers/scsi/wd33c93.c 2006-09-04 01:46:26.0 
+0200
@@ -85,6 +85,8 @@
 #include scsi/scsi_device.h
 #include scsi/scsi_host.h
 
+#include asm/irq.h
+
 #include wd33c93.h
 
 
@@ -1710,7 +1712,7 @@
 static char setup_used[MAX_SETUP_ARGS];
 static int done_setup = 0;
 
-int
+static int
 wd33c93_setup(char *str)
 {
int i;


-
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: adding the SCSI hptiop driver to 2.6.16

2006-11-25 Thread Adrian Bunk
On Thu, Nov 23, 2006 at 11:56:56AM +0800, HighPoint Linux Team wrote:
 Adrian Bunk wrote:
  I'd like to add the SCSI hptiop driver to the 2.6.16 tree.
  
  The backport of the driver in 2.6.18 seems to be straightforward.
  
  My questions are:
  
  Is there any reason I miss why this driver might not work in 2.6.16?
  
  I lack the hardware, and I can therefore only test the compilation.
  Would anyone who has the hardware be willing to test whether this 
  actually works?
 
 Actually, the driver was developped and tested on 2.6.16 before it
 was submitted.

Thanks for this information, I've added the hptiop driver to 2.6.16.

 HighPoint Linux Team

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] fix compiler warning in aic7770

2005-08-30 Thread Adrian Bunk
On Tue, Aug 30, 2005 at 01:15:36AM +0200, Jesper Juhl wrote:

 Fix compiler warning in drivers/scsi/aic7xxx/aic7770.c : 
drivers/scsi/aic7xxx/aic7770.c:129: warning: unused variable `l'
...

This patch is already in 2.6.13-rc6-mm2 (through the scsi-misc-2.6.git 
tree).

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


[2.6 patch] drivers/scsi/constants.c should include scsi_dbg.h

2005-08-20 Thread Adrian Bunk
C files should include the files with the prototypes for their global 
functions.


Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

--- linux-2.6.13-rc6-mm1/drivers/scsi/constants.c.old   2005-08-20 
14:42:12.0 +0200
+++ linux-2.6.13-rc6-mm1/drivers/scsi/constants.c   2005-08-20 
14:43:03.0 +0200
@@ -17,6 +17,7 @@
 #include scsi/scsi_host.h
 #include scsi/scsi_request.h
 #include scsi/scsi_eh.h
+#include scsi/scsi_dbg.h
 
 
 

-
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.13-rc6-mm1: drivers/scsi/aic7xxx/ compile error

2005-08-19 Thread Adrian Bunk
--  snip  --

...
  LD  drivers/scsi/aic7xxx/built-in.o
drivers/scsi/aic7xxx/aic79xx.o: In function `aic_parse_brace_option':
: multiple definition of `aic_parse_brace_option'
drivers/scsi/aic7xxx/aic7xxx.o:: first defined here
make[3]: *** [drivers/scsi/aic7xxx/built-in.o] Error 1

--  snip  --


#includ'ing .c files is considered harmful...


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 CC] gdth: remove GDTIOCTL_OSVERS

2005-08-07 Thread Adrian Bunk
On Mon, Aug 08, 2005 at 02:28:29AM +0400, Alexey Dobriyan wrote:

...
 --- linux-vanilla/drivers/scsi/gdth.c 2005-08-08 02:16:47.0 +0400
 +++ linux-gdth/drivers/scsi/gdth.c2005-08-08 02:19:59.0 +0400
 @@ -5411,18 +5411,6 @@ static int gdth_ioctl(struct inode *inod
  return -EFAULT;
  break;
}
 -  
 -  case GDTIOCTL_OSVERS:
 -  { 
 -gdth_ioctl_osvers osv; 
 -
 -osv.version = (unchar)(LINUX_VERSION_CODE  16);
 -osv.subversion = (unchar)(LINUX_VERSION_CODE  8);
 -osv.revision = (ushort)(LINUX_VERSION_CODE  0xff);
 -if (copy_to_user(argp, osv, sizeof(gdth_ioctl_osvers)))
 -return -EFAULT;
 -break;
 -  }
...

Not that I'd like this, but you know that this is a userspace-visible 
change?

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


[2.6 patch] remove the obsolete SCSI qlogicisp driver

2005-07-31 Thread Adrian Bunk
The SCSI qlogicisp driver is both marked BROKEN and superseded by the 
qla1280 driver.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

This patch was already sent on:
- 22 Jul 2005

Due to it's size, the patch is attached compressed.

 Documentation/scsi/00-INDEX  |2 
 Documentation/scsi/qlogicfas.txt |3 
 Documentation/scsi/qlogicisp.txt |   30 
 drivers/scsi/Kconfig |   29 
 drivers/scsi/Makefile|1 
 drivers/scsi/qlogicisp.c | 1934 -
 drivers/scsi/qlogicisp_asm.c | 2034 ---
 7 files changed, 1 insertion(+), 4032 deletions(-)


patch-remove-qlogicisp.gz
Description: Binary data


Re: [-mm patch] SCSI_QLA2ABC options must select FW_LOADER

2005-07-21 Thread Adrian Bunk
On Wed, Jul 20, 2005 at 03:38:02PM +0200, Jesper Juhl wrote:
...
 I send a patch for this yesterday that lets SCSI_QLA2XXX select
 FW_LOADER. I believe that's a bit better since the other options
 depend on SCSI_QLA2XXX anyway, there's no point in having them all set
 FW_LOADER. My patch also fixes another little issue; that you cannot
 disable SCSI_QLA2XXX if you don't need it.
...

That's not an issue, this seems to be intentional.

Whether SCSI_QLA2XXX should be user-visible (as your patches make it) or 
stay as it is (with the fixes from my patches) doesn't matter much - 
both are valid setups.

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


  1   2   >