Re: [ANNOUNCE] iSCSI Initiator Core Stack v1.6.1.20

2005-02-28 Thread Andre Hedrick

Hi Dave,

If the NetAPP target is misconfigured, why would it even allow any unknown
initiator to go beyond discovery session?  It appears that a
semi-successful lun scan has happened or am mis reading the report?

If I read deeper into your comments, does the target support ACL's?
If yes, then how did any access to the target by an unauthorized initiator
happen?

Also would you be kind enough to reveal what device class 31 is to conform
to under scsi?

Cheers,

Andre

On Sun, 27 Feb 2005, Dave Wysochanski wrote:

 AJ Lewis wrote:
 
  Nicholas A. Bellinger [EMAIL PROTECTED] writes:
 
   The following is the first public release of the PyX Technologies iSCSI
   Initiator Core Stack v1.6.1.20 for Linux 2.6.11-rc4.  This is a full
   featured iSCSI Initiator stack that is capable of mulitplexing coast to
   coast across multiple independant backbone providers using various
   network transports _TODAY_.  This is the first release of the core 
  stack
   and assoicated userspace tools, the accompanying authentication daemon
   will be released shortly.
 
  Very cool - glad you're releasing this. I've gotten this setup and
  running, but I can't seem to talk to my iscsi target.  The initiator
  detects it, but it can't recognize the type:
 
  iCHANNEL[0] - No defined iSCSI Authentication Methods, skipping 
  SecurityNegotiation phase.
  iCHANNEL[0] - iSCSI login successful on CID: 0 to 192.168.44.19:3260,2
  iCHANNEL[0] - Incremented iSCSI connection count to 1 to node: 
  iqn.1992-08.com.netapp:sn.33615311
  iCHANNEL[0] - Established iSCSI session to node: 
  iqn.1992-08.com.netapp:sn.33615311
  iSCSI Core Stack[1] - Incremented number of active iSCSI sessions to 1.
  scsi: unknown device type 31
Vendor: NETAPPModel: LUN   Rev: 0.2
Type:   UnknownANSI SCSI revision: 04
 
  Any ideas on why this wouldn't be working?  Is there a configuration
  step I'm missing?
 
 Make sure the initiator name is in the igroup on the filer for
 any luns that you want mapped to the intiator.
 
 I think what you're seeing is not a real LUN, but the config LUN
 or something like that, probably the result of the initiator name
 not being in the igroup (see igroup add command on the filer).
 
  Also, are you planning on updating the docs for the user tools at all?
  There are several steps missing in the current README, and the man
  page lists some parameters incorrectly and misses other entirely.
 
  I'm looking forward to getting this working.
  -- 
  AJ Lewis   Voice:  612-638-0500
  Red Hat Inc.   E-Mail: [EMAIL PROTECTED]
  720 Washington Ave. SE, Suite 200
  Minneapolis, MN 55414

  Current GPG fingerprint = D9F8 EDCE 4242 855F A03D  9B63 F50C 54A8 
  578C 8715
  Grab the key at: http://people.redhat.com/alewis/gpg.html or one of the
  many keyservers out there...
 
  -
  To unsubscribe from this list: send the line unsubscribe linux-scsi in
  the body of a message to [EMAIL PROTECTED]
  More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
 -
 To unsubscribe from this list: send the line unsubscribe linux-scsi in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 

-
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/aacraid/: cleanups

2005-02-28 Thread Salyzyn, Mark
I approve this, please apply to kernel.org branch.

Second time this has been submitted, been integrated since November 24th
in 1.1.5-2370 of the Adaptec Branch of the driver.

Sincerely -- Mark Salyzyn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adrian Bunk
Sent: Saturday, February 26, 2005 7:54 PM
To: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/scsi/aacraid/: cleanups

This patch contains the following cleanups:
- make needlessly global functions static
- commsup.c: remove the unused global function aac_consumer_avail

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

---

 drivers/scsi/aacraid/aachba.c   |   10 +-
 drivers/scsi/aacraid/aacraid.h  |2 --
 drivers/scsi/aacraid/commctrl.c |4 ++--
 drivers/scsi/aacraid/comminit.c |2 +-
 drivers/scsi/aacraid/commsup.c  |7 +--
 drivers/scsi/aacraid/linit.c|2 +-
 drivers/scsi/aacraid/sa.c   |2 +-
 7 files changed, 11 insertions(+), 18 deletions(-)

--- linux-2.6.11-rc4-mm1-full/drivers/scsi/aacraid/aachba.c.old
2005-02-27 01:05:38.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/aacraid/aachba.c
2005-02-27 01:06:18.0 +0100
@@ -560,10 +560,10 @@
inqstrcpy (V1.0, str-prl);
 }
 
-void set_sense(u8 *sense_buf, u8 sense_key, u8 sense_code,
-   u8 a_sense_code, u8 incorrect_length,
-   u8 bit_pointer, u16 field_pointer,
-   u32 residue)
+static void set_sense(u8 *sense_buf, u8 sense_key, u8 sense_code,
+ u8 a_sense_code, u8 incorrect_length,
+ u8 bit_pointer, u16 field_pointer,
+ u32 residue)
 {
sense_buf[0] = 0xF0;/* Sense data valid, err code 70h
(current error) */
sense_buf[1] = 0;   /* Segment number, always zero */
@@ -807,7 +807,7 @@
aac_io_done(scsicmd);
 }
 
-int aac_read(struct scsi_cmnd * scsicmd, int cid)
+static int aac_read(struct scsi_cmnd * scsicmd, int cid)
 {
u32 lba;
u32 count;
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/aacraid/commctrl.c.old
2005-02-27 01:06:31.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/aacraid/commctrl.c
2005-02-27 01:07:03.0 +0100
@@ -403,7 +403,7 @@
  *
  */
 
-int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
+static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
 {
struct fib* srbfib;
int status;
@@ -621,7 +621,7 @@
 };
 
 
-int aac_get_pci_info(struct aac_dev* dev, void __user *arg)
+static int aac_get_pci_info(struct aac_dev* dev, void __user *arg)
 {
 struct aac_pci_info pci_info;
 
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/aacraid/comminit.c.old
2005-02-27 01:07:25.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/aacraid/comminit.c
2005-02-27 01:07:34.0 +0100
@@ -204,7 +204,7 @@
  * 0 - If there were errors initing. This is a fatal error.
  */
  
-int aac_comm_init(struct aac_dev * dev)
+static int aac_comm_init(struct aac_dev * dev)
 {
unsigned long hdrsize = (sizeof(u32) * NUMBER_OF_COMM_QUEUES) *
2;
unsigned long queuesize = sizeof(struct aac_entry) *
TOTAL_QUEUE_ENTRIES;
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/aacraid/aacraid.h.old
2005-02-27 01:04:59.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/aacraid/aacraid.h
2005-02-27 01:09:03.0 +0100
@@ -1595,11 +1595,9 @@
 void fib_map_free(struct aac_dev *dev);
 void fib_free(struct fib * context);
 void fib_init(struct fib * context);
-void fib_dealloc(struct fib * context);
 void aac_printf(struct aac_dev *dev, u32 val);
 int fib_send(u16 command, struct fib * context, unsigned long size, int
priority, int wait, int reply, fib_callback callback, void *ctxt);
 int aac_consumer_get(struct aac_dev * dev, struct aac_queue * q, struct
aac_entry **entry);
-int aac_consumer_avail(struct aac_dev * dev, struct aac_queue * q);
 void aac_consumer_free(struct aac_dev * dev, struct aac_queue * q, u32
qnum);
 int fib_complete(struct fib * context);
 #define fib_data(fibctx) ((void *)(fibctx)-hw_fib-data)
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/aacraid/commsup.c.old
2005-02-27 01:08:23.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/aacraid/commsup.c
2005-02-27 01:09:11.0 +0100
@@ -210,7 +210,7 @@
  * caller.
  */
  
-void fib_dealloc(struct fib * fibptr)
+static void fib_dealloc(struct fib * fibptr)
 {
struct hw_fib *hw_fib = fibptr-hw_fib;
if(hw_fib-header.StructType != FIB_MAGIC) 
@@ -566,11 +566,6 @@
return(status);
 }
 
-int aac_consumer_avail(struct aac_dev *dev, struct aac_queue * q)
-{
-   return (le32_to_cpu(*q-headers.producer) !=
le32_to_cpu(*q-headers.consumer));
-}
-
 
 /**
  * aac_consumer_free   -   free consumer entry
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/aacraid/linit.c.old
2005-02-27 01:09:30.0 +0100
+++ 

Re: [ANNOUNCE] iSCSI Initiator Core Stack v1.6.1.20

2005-02-28 Thread Dave Wysochanski
Andre Hedrick wrote:
Hi Dave,
If the NetAPP target is misconfigured, why would it even allow any 
unknown
initiator to go beyond discovery session?  It appears that a
semi-successful lun scan has happened or am mis reading the report?

I think you're misreading the report and/or don't understand how our target
works.
If I read deeper into your comments, does the target support ACL's?
If yes, then how did any access to the target by an unauthorized 
initiator
happen?

The LUN mapping and security are technically different lists.  The
default  security policy (unless set otherwise) is AuthMethod=none.
By default though, you don't get any LUNs until you explicitly
map them.
Also would you be kind enough to reveal what device class 31 is to 
conform
to under scsi?

I'll try to get more information on what's going on here.  I didn't actually
repro this, so I don't have a trace either - was just commenting based
on the mail.
Cheers,
Andre
On Sun, 27 Feb 2005, Dave Wysochanski wrote:
 AJ Lewis wrote:

  Nicholas A. Bellinger [EMAIL PROTECTED] writes:
 
   The following is the first public release of the PyX 
Technologies iSCSI
   Initiator Core Stack v1.6.1.20 for Linux 2.6.11-rc4.  This is a 
full
   featured iSCSI Initiator stack that is capable of mulitplexing 
coast to
   coast across multiple independant backbone providers using various
   network transports _TODAY_.  This is the first release of the core
  stack
   and assoicated userspace tools, the accompanying authentication 
daemon
   will be released shortly.
 
  Very cool - glad you're releasing this. I've gotten this setup and
  running, but I can't seem to talk to my iscsi target.  The initiator
  detects it, but it can't recognize the type:
 
  iCHANNEL[0] - No defined iSCSI Authentication Methods, skipping
  SecurityNegotiation phase.
  iCHANNEL[0] - iSCSI login successful on CID: 0 to 
192.168.44.19:3260,2
  iCHANNEL[0] - Incremented iSCSI connection count to 1 to node:
  iqn.1992-08.com.netapp:sn.33615311
  iCHANNEL[0] - Established iSCSI session to node:
  iqn.1992-08.com.netapp:sn.33615311
  iSCSI Core Stack[1] - Incremented number of active iSCSI sessions 
to 1.
  scsi: unknown device type 31
Vendor: NETAPPModel: LUN   Rev: 0.2
Type:   UnknownANSI SCSI revision: 04
 
  Any ideas on why this wouldn't be working?  Is there a configuration
  step I'm missing?
 
 Make sure the initiator name is in the igroup on the filer for
 any luns that you want mapped to the intiator.

 I think what you're seeing is not a real LUN, but the config LUN
 or something like that, probably the result of the initiator name
 not being in the igroup (see igroup add command on the filer).

  Also, are you planning on updating the docs for the user tools at 
all?
  There are several steps missing in the current README, and the man
  page lists some parameters incorrectly and misses other entirely.
 
  I'm looking forward to getting this working.
  --
  AJ Lewis   Voice:  612-638-0500
  Red Hat Inc.   E-Mail: [EMAIL PROTECTED]
  720 Washington Ave. SE, Suite 200
  Minneapolis, MN 55414
   
  Current GPG fingerprint = D9F8 EDCE 4242 855F A03D  9B63 F50C 54A8
  578C 8715
  Grab the key at: http://people.redhat.com/alewis/gpg.html or one 
of the
  many keyservers out there...
 
  -
  To unsubscribe from this list: send the line unsubscribe 
linux-scsi in
  the body of a message to [EMAIL PROTECTED]
  More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
 -
 To unsubscribe from this list: send the line unsubscribe 
linux-scsi in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html


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


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

2005-02-28 Thread Adrian Bunk
This patch contains the following cleanups:
- make some needlessly global functions static
- remove one more kernel 2.2 #ifdef

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

---

 drivers/scsi/gdth.c |   24 
 drivers/scsi/gdth.h |   41 -
 2 files changed, 12 insertions(+), 53 deletions(-)

--- linux-2.6.11-rc4-mm1-full/drivers/scsi/gdth.h.old   2005-02-28 
18:25:09.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/gdth.h   2005-02-28 
18:31:38.0 +0100
@@ -1029,51 +1029,10 @@
 
 /* function prototyping */
 
-int gdth_detect(Scsi_Host_Template *);
-int gdth_release(struct Scsi_Host *);
-int gdth_queuecommand(Scsi_Cmnd *,void (*done)(Scsi_Cmnd *));
-const char *gdth_info(struct Scsi_Host *);
-
 #if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,0)
-int gdth_bios_param(struct scsi_device *,struct block_device *,sector_t,int *);
 int gdth_proc_info(struct Scsi_Host *, char *,char **,off_t,int,int);
-#elif LINUX_VERSION_CODE = KERNEL_VERSION(2,4,0)
-int gdth_bios_param(Disk *,kdev_t,int *);
-int gdth_proc_info(char *,char **,off_t,int,int,int);
 #else
-int gdth_bios_param(Disk *,kdev_t,int *);
-extern struct proc_dir_entry proc_scsi_gdth;
 int gdth_proc_info(char *,char **,off_t,int,int,int);
-int gdth_abort(Scsi_Cmnd *);
-int gdth_reset(Scsi_Cmnd *,unsigned int); 
-#define GDTH { proc_dir:proc_scsi_gdth, \
-   proc_info:   gdth_proc_info,  \
-   name:GDT SCSI Disk Array Controller,\
-   detect:  gdth_detect, \
-   release: gdth_release,\
-   info:gdth_info,   \
-   command: NULL,\
-   queuecommand:gdth_queuecommand,   \
-   eh_abort_handler: gdth_eh_abort,  \
-   eh_device_reset_handler: gdth_eh_device_reset,\
-   eh_bus_reset_handler: gdth_eh_bus_reset,  \
-   eh_host_reset_handler: gdth_eh_host_reset,\
-   abort:   gdth_abort,  \
-   reset:   gdth_reset,  \
-   bios_param:  gdth_bios_param, \
-   can_queue:   GDTH_MAXCMDS,\
-   this_id: -1,  \
-   sg_tablesize:GDTH_MAXSG,  \
-   cmd_per_lun: GDTH_MAXC_P_L,   \
-   present: 0,   \
-   unchecked_isa_dma: 1, \
-   use_clustering:  ENABLE_CLUSTERING,   \
-   use_new_eh_code: 1   /* use new error code */ }
 #endif
 
-int gdth_eh_abort(Scsi_Cmnd *scp);
-int gdth_eh_device_reset(Scsi_Cmnd *scp);
-int gdth_eh_bus_reset(Scsi_Cmnd *scp);
-int gdth_eh_host_reset(Scsi_Cmnd *scp);
-
 #endif
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/gdth.c.old   2005-02-28 
18:25:50.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/gdth.c   2005-02-28 
18:44:14.0 +0100
@@ -4034,7 +4034,7 @@
 }
 
 #ifdef GDTH_STATISTICS
-void gdth_timeout(ulong data)
+static void gdth_timeout(ulong data)
 {
 ulong32 i;
 Scsi_Cmnd *nscp;
@@ -4062,7 +4062,7 @@
 }
 #endif
 
-void __init internal_setup(char *str,int *ints)
+static void __init internal_setup(char *str,int *ints)
 {
 int i, argc;
 char *cur_str, *argv;
@@ -4153,7 +4153,7 @@
 return 1;
 }
 
-int __init gdth_detect(Scsi_Host_Template *shtp)
+static int __init gdth_detect(Scsi_Host_Template *shtp)
 {
 struct Scsi_Host *shp;
 gdth_pci_str pcistr[MAXHA];
@@ -4604,7 +4604,7 @@
 }
 
 
-int gdth_release(struct Scsi_Host *shp)
+static int gdth_release(struct Scsi_Host *shp)
 {
 int hanum;
 gdth_ha_str *ha;
@@ -4691,7 +4691,7 @@
 return();
 }
 
-const char *gdth_info(struct Scsi_Host *shp)
+static const char *gdth_info(struct Scsi_Host *shp)
 {
 int hanum;
 gdth_ha_str *ha;
@@ -4704,19 +4704,19 @@
 }
 
 /* new error handling */
-int gdth_eh_abort(Scsi_Cmnd *scp)
+static int gdth_eh_abort(Scsi_Cmnd *scp)
 {
 TRACE2((gdth_eh_abort()\n));
 return FAILED;
 }
 
-int gdth_eh_device_reset(Scsi_Cmnd *scp)
+static int gdth_eh_device_reset(Scsi_Cmnd *scp)
 {
 TRACE2((gdth_eh_device_reset()\n));
 return FAILED;
 }
 
-int gdth_eh_bus_reset(Scsi_Cmnd *scp)
+static int gdth_eh_bus_reset(Scsi_Cmnd *scp)
 {
 int i, hanum;
 gdth_ha_str *ha;
@@ -4770,7 +4770,7 @@
 return SUCCESS;
 }
 
-int gdth_eh_host_reset(Scsi_Cmnd *scp)
+static int gdth_eh_host_reset(Scsi_Cmnd *scp)
 {
 TRACE2((gdth_eh_host_reset()\n));
 return FAILED;
@@ -4778,9 +4778,9 @@
 
 
 #if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,0)
-int gdth_bios_param(struct scsi_device *sdev,struct 

[-mm patch] drivers/scsi/ch.c: make a struct static

2005-02-28 Thread Adrian Bunk
This patch makes a needlessly global struct static.

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

--- linux-2.6.11-rc4-mm1-full/drivers/scsi/ch.c.old 2005-02-28 
18:14:48.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/ch.c 2005-02-28 18:14:55.0 
+0100
@@ -118,7 +118,7 @@
 static spinlock_t ch_devlist_lock = SPIN_LOCK_UNLOCKED;
 static int ch_devcount;
 
-struct scsi_driver ch_template =
+static struct scsi_driver ch_template =
 {
.owner  = THIS_MODULE,
.gendrv = {

-
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/initio.c: cleanups

2005-02-28 Thread Adrian Bunk
This patch contains the following cleanups:
- make needlessly global code static
- remove or #if 0 the following unused finctions:
  - tul_pop_pend_scb
  - tul_device_reset
  - tul_reset_scsi_bus

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

---

 drivers/scsi/initio.c |   85 +-
 drivers/scsi/initio.h |   18 
 2 files changed, 36 insertions(+), 67 deletions(-)

--- linux-2.6.11-rc4-mm1-full/drivers/scsi/initio.h.old 2005-02-28 
19:22:44.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/initio.h 2005-02-28 
19:30:57.0 +0100
@@ -719,21 +719,3 @@
 #define SCSI_RESET_HOST_RESET 0x200
 #define SCSI_RESET_ACTION   0xff
 
-extern void init_i91uAdapter_table(void);
-extern int Addi91u_into_Adapter_table(WORD, WORD, BYTE, BYTE, BYTE);
-extern int tul_ReturnNumberOfAdapters(void);
-extern void get_tulipPCIConfig(HCS * pHCB, int iChannel_index);
-extern int init_tulip(HCS * pHCB, SCB * pSCB, int tul_num_scb, BYTE * 
pbBiosAdr, int reset_time);
-extern SCB *tul_alloc_scb(HCS * pHCB);
-extern int tul_abort_srb(HCS * pHCB, struct scsi_cmnd * pSRB);
-extern void tul_exec_scb(HCS * pHCB, SCB * pSCB);
-extern void tul_release_scb(HCS * pHCB, SCB * pSCB);
-extern void tul_stop_bm(HCS * pHCB);
-extern int tul_reset_scsi(HCS * pCurHcb, int seconds);
-extern int tul_isr(HCS * pHCB);
-extern int tul_reset(HCS * pHCB, struct scsi_cmnd * pSRB, unsigned char 
target);
-extern int tul_reset_scsi_bus(HCS * pCurHcb);
-extern int tul_device_reset(HCS * pCurHcb, struct scsi_cmnd *pSrb,
-   unsigned int target, unsigned int ResetFlags);
-   /*  EXTERNAL VARIABLES  */
-extern HCS tul_hcs[];
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/initio.c.old 2005-02-28 
19:23:00.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/initio.c 2005-02-28 
20:51:32.0 +0100
@@ -223,7 +223,7 @@
 static void tul_select_atn3(HCS * pCurHcb, SCB * pCurScb);
 static void tul_select_atn_stop(HCS * pCurHcb, SCB * pCurScb);
 static int int_tul_busfree(HCS * pCurHcb);
-int int_tul_scsi_rst(HCS * pCurHcb);
+static int int_tul_scsi_rst(HCS * pCurHcb);
 static int int_tul_bad_seq(HCS * pCurHcb);
 static int int_tul_resel(HCS * pCurHcb);
 static int tul_sync_done(HCS * pCurHcb);
@@ -240,9 +240,8 @@
 static void tul_se2_update_all(WORD CurBase);  /* setup default pattern */
 static void tul_read_eeprom(WORD CurBase);
 
-   /*  EXTERNAL VARIABLES  */
-HCS tul_hcs[MAX_SUPPORTED_ADAPTERS];
/*  INTERNAL VARIABLES  */
+static HCS tul_hcs[MAX_SUPPORTED_ADAPTERS];
 static INI_ADPT_STRUCT i91u_adpt[MAX_SUPPORTED_ADAPTERS];
 
 /*NVRAM nvram, *nvramp = nvram; */
@@ -381,7 +380,7 @@
 
 
 **/
-void tul_se2_instr(WORD CurBase, UCHAR instr)
+static void tul_se2_instr(WORD CurBase, UCHAR instr)
 {
int i;
UCHAR b;
@@ -437,7 +436,7 @@
Input  :address of Serial E2PROM
Output :value stored in  Serial E2PROM
 ***/
-USHORT tul_se2_rd(WORD CurBase, ULONG adr)
+static USHORT tul_se2_rd(WORD CurBase, ULONG adr)
 {
UCHAR instr, readByte;
USHORT readWord;
@@ -468,7 +467,7 @@
 /**
  Input: new value in  Serial E2PROM, address of Serial E2PROM
 ***/
-void tul_se2_wr(WORD CurBase, UCHAR adr, USHORT writeWord)
+static void tul_se2_wr(WORD CurBase, UCHAR adr, USHORT writeWord)
 {
UCHAR readByte;
UCHAR instr;
@@ -584,8 +583,8 @@
TUL_WR(CurBase + TUL_GCTRL, gctrl  ~TUL_GCTRL_EEPROM_BIT);
 }  /* read_eeprom */
 
-int Addi91u_into_Adapter_table(WORD wBIOS, WORD wBASE, BYTE bInterrupt,
-  BYTE bBus, BYTE bDevice)
+static int Addi91u_into_Adapter_table(WORD wBIOS, WORD wBASE, BYTE bInterrupt,
+ BYTE bBus, BYTE bDevice)
 {
int i, j;
 
@@ -616,7 +615,7 @@
return 1;
 }
 
-void init_i91uAdapter_table(void)
+static void init_i91uAdapter_table(void)
 {
int i;
 
@@ -630,7 +629,7 @@
return;
 }
 
-void tul_stop_bm(HCS * pCurHcb)
+static void tul_stop_bm(HCS * pCurHcb)
 {
 
if (TUL_RD(pCurHcb-HCS_Base, TUL_XStatus)  XPEND) {   /* if DMA xfer 
is pending, abort DMA xfer */
@@ -642,7 +641,7 @@
 }
 
 /***/
-void get_tulipPCIConfig(HCS * pCurHcb, int ch_idx)
+static void get_tulipPCIConfig(HCS * pCurHcb, int ch_idx)
 {
pCurHcb-HCS_Base = i91u_adpt[ch_idx].ADPT_BASE;/* Supply base 
address  */
pCurHcb-HCS_BIOS = i91u_adpt[ch_idx].ADPT_BIOS;/* Supply BIOS 
address  */
@@ -651,7 +650,7 @@
 }
 
 

Re: [PATCH 9/13] nsp32, nsp_cs driver update

2005-02-28 Thread James Bottomley
On Tue, 2005-02-22 at 16:11 +0900, Yokota Hiroshi wrote:
 + if (data-CurrentSC != NULL) {
 + nsp_msg(KERN_WARNING, CurrentSC!=NULL this can't be happen);
   SCpnt-result   = DID_BAD_TARGET  16;
   nsp_scsi_done(SCpnt);
 - return 0;
 + return SCSI_MLQUEUE_HOST_BUSY;
   }


This looks wrong.  Either you call done on the command or you return
busy.  If you do both, the command will be completed twice.  There seem
to be a lot of other places where the driver will call done then return
BUSY too ...

James


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


Re: [PATCH as470] Add a NOREPORTLUN blacklist flag

2005-02-28 Thread James Bottomley
On Sun, 2005-02-20 at 22:44 -0500, Alan Stern wrote:
 James, please withdraw the patch above.

Actually, I already have this in the tree.  Could you just do an
incremental to remove the blacklist line since I think the IBM people
still want their shark fix?

Thanks,

James


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


Re: [2.6 patch] drivers/scsi/qla2xxx/: cleanups

2005-02-28 Thread Christoph Hellwig
On Mon, Feb 28, 2005 at 10:00:24PM +0100, Adrian Bunk wrote:
 This patch contains the following cleanups:
 - make needlessly global code static
 - kill the unused global *_version and *_version_str variables
   in the firmware files

The firmware files are generated, so it'd be better to leave them
alone.
-
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: possible cleanups

2005-02-28 Thread Adrian Bunk
Before I'm getting flamed to death:
This patch contains possible cleanups. If parts of this patch conflict 
with pending changes these parts of my patch have to be dropped.

This patch contains the following possible cleanups:
- make needlessly global code static
- remove or #if 0 the following unused functions:
  - scsi.h: print_driverbyte
  - scsi.h: print_hostbyte
  - constants.c: scsi_print_hostbyte
  - constants.c: scsi_print_driverbyte
  - scsi_scan.c: scsi_scan_single_target
- remove the following unneeded EXPORT_SYMBOL's:
  - constants.c: __scsi_print_sense
  - hosts.c: scsi_host_lookup
  - scsi.c: scsi_device_cancel
  - scsi_error.c: scsi_normalize_sense
  - scsi_error.c: scsi_sense_desc_find
  - scsi_lib.c: scsi_device_resume
  - scsi_scan.c: scsi_rescan_device
  - scsi_scan.c: scsi_scan_single_target

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

---

 drivers/scsi/constants.c   |   56 -
 drivers/scsi/hosts.c   |3 -
 drivers/scsi/scsi.c|9 +++--
 drivers/scsi/scsi.h|8 -
 drivers/scsi/scsi_debug.c  |2 -
 drivers/scsi/scsi_error.c  |6 +--
 drivers/scsi/scsi_lib.c|5 +--
 drivers/scsi/scsi_priv.h   |4 --
 drivers/scsi/scsi_scan.c   |3 +
 drivers/scsi/scsi_sysfs.c  |4 +-
 include/scsi/scsi_dbg.h|5 ---
 include/scsi/scsi_device.h |1 
 include/scsi/scsi_eh.h |3 -
 include/scsi/scsi_host.h   |2 -
 14 files changed, 16 insertions(+), 95 deletions(-)

--- linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi.h.old   2005-02-28 
18:18:22.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi.h   2005-02-28 
18:19:02.0 +0100
@@ -80,14 +80,6 @@
 {
return scsi_print_req_sense(devclass, req);
 }
-static inline void print_driverbyte(int scsiresult)
-{
-   return scsi_print_driverbyte(scsiresult);
-}
-static inline void print_hostbyte(int scsiresult)
-{
-   return scsi_print_hostbyte(scsiresult);
-}
 static inline void print_status(unsigned char status)
 {
return scsi_print_status(status);
--- linux-2.6.11-rc4-mm1-full/include/scsi/scsi_dbg.h.old   2005-02-28 
18:17:32.0 +0100
+++ linux-2.6.11-rc4-mm1-full/include/scsi/scsi_dbg.h   2005-02-28 
18:18:57.0 +0100
@@ -8,11 +8,6 @@
 extern void __scsi_print_command(unsigned char *);
 extern void scsi_print_sense(const char *, struct scsi_cmnd *);
 extern void scsi_print_req_sense(const char *, struct scsi_request *);
-extern void __scsi_print_sense(const char *name,
-  const unsigned char *sense_buffer,
-  int sense_len);
-extern void scsi_print_driverbyte(int);
-extern void scsi_print_hostbyte(int);
 extern void scsi_print_status(unsigned char);
 extern int scsi_print_msg(const unsigned char *);
 extern const char *scsi_sense_key_string(unsigned char);
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/constants.c.old  2005-02-28 
18:17:46.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/constants.c  2005-02-28 
18:19:47.0 +0100
@@ -1156,7 +1156,7 @@
 }
 
 /* Print sense information */
-void
+static void
 __scsi_print_sense(const char *name, const unsigned char *sense_buffer,
   int sense_len)
 {
@@ -1251,7 +1251,6 @@
printk(\n);
}
 }
-EXPORT_SYMBOL(__scsi_print_sense);
 
 void scsi_print_sense(const char *devclass, struct scsi_cmnd *cmd)
 {
@@ -1393,56 +1392,3 @@
 }
 EXPORT_SYMBOL(scsi_print_command);
 
-#ifdef CONFIG_SCSI_CONSTANTS
-
-static const char * hostbyte_table[]={
-DID_OK, DID_NO_CONNECT, DID_BUS_BUSY, DID_TIME_OUT, DID_BAD_TARGET, 
-DID_ABORT, DID_PARITY, DID_ERROR, DID_RESET, DID_BAD_INTR,
-DID_PASSTHROUGH, DID_SOFT_ERROR, DID_IMM_RETRY};
-#define NUM_HOSTBYTE_STRS (sizeof(hostbyte_table) / sizeof(const char *))
-
-void scsi_print_hostbyte(int scsiresult)
-{
-   int hb = host_byte(scsiresult);
-
-   printk(Hostbyte=0x%02x, hb);
-   if (hb  NUM_HOSTBYTE_STRS)
-   printk((%s) , hostbyte_table[hb]);
-   else
-   printk(is invalid ); 
-}
-#else
-void scsi_print_hostbyte(int scsiresult)
-{
-   printk(Hostbyte=0x%02x , host_byte(scsiresult));
-}
-#endif
-
-#ifdef CONFIG_SCSI_CONSTANTS
-
-static const char * driverbyte_table[]={
-DRIVER_OK, DRIVER_BUSY, DRIVER_SOFT,  DRIVER_MEDIA, DRIVER_ERROR, 
-DRIVER_INVALID, DRIVER_TIMEOUT, DRIVER_HARD, DRIVER_SENSE};
-#define NUM_DRIVERBYTE_STRS (sizeof(driverbyte_table) / sizeof(const char *))
-
-static const char * driversuggest_table[]={SUGGEST_OK,
-SUGGEST_RETRY, SUGGEST_ABORT, SUGGEST_REMAP, SUGGEST_DIE,
-SUGGEST_5, SUGGEST_6, SUGGEST_7, SUGGEST_SENSE};
-#define NUM_SUGGEST_STRS (sizeof(driversuggest_table) / sizeof(const char *))
-
-void scsi_print_driverbyte(int scsiresult)
-{
-   int dr = (driver_byte(scsiresult)  DRIVER_MASK);
-   int su = ((driver_byte(scsiresult)  SUGGEST_MASK)  4);
-
-   printk(Driverbyte=0x%02x , driver_byte(scsiresult));
-   printk((%s,%s) ,
-   

Re: [2.6 patch] drivers/scsi/qla2xxx/: cleanups

2005-02-28 Thread Adrian Bunk
On Mon, Feb 28, 2005 at 09:29:20PM +, Christoph Hellwig wrote:
 On Mon, Feb 28, 2005 at 10:00:24PM +0100, Adrian Bunk wrote:
  This patch contains the following cleanups:
  - make needlessly global code static
  - kill the unused global *_version and *_version_str variables
in the firmware files
 
 The firmware files are generated, so it'd be better to leave them
 alone.

Agreed.

But can't the generation of these files omit these needless variables 
(there are already #define's containing the version information)?

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] remove dead cyrix/centaur mtrr init code

2005-02-28 Thread Andries Brouwer
On Mon, Feb 28, 2005 at 08:35:29PM +0100, Adrian Bunk wrote:
 Hi Andries,
 
 your patch has many overlappings with a patch of mine aleady in -mm 
 (both none of the two patches is a subset of the other one).
 
 Nowadays, working against -mm often avoids duplicate work.
 
 cu
 Adrian

As far as I am concerned this doesnt matter so much.

This is very trivial work, and only little time is wasted
in case of duplication. It is unavoidable.

(For example, looking at the detect functions of scsi drivers
I happened to come across pas16.c and did a largish cleanup.
Hesitate a bit submitting the results, since the driver showed
some signs of bitrot - maybe nobody has used it for years -
if someone uses pas16, please tell me - let me cc linux-scsi -
but today you submit a little patch on pas16.)

Andries
-
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/qla2xxx/: cleanups

2005-02-28 Thread Andrew Vasquez
On Mon, 28 Feb 2005, Adrian Bunk wrote:

 This patch contains the following cleanups:
 - make needlessly global code static

As Christoph mentioned, the firmware images are auto-generated, so I'd
rather hold off on those deltas.  Besides, I'm hoping in the near
future to drop the firmware from the distribution and begin to use the
request_firmware() interface exclusively.

 - kill the unused global *_version and *_version_str variables
   in the firmware files
 

The driver is also going through some significant overhauling with the
fc_remote_port stuffs -- where most internal queueing is stripped from
the driver.  

 -static __inline__ void qla2x00_add_timer_to_cmd(srb_t *, int);
 -static __inline__ void qla2x00_delete_timer_from_cmd(srb_t *);
 -
 -/**
 -*   qla2x00_add_timer_to_cmd
 -*
 -* Description:
 -*   Creates a timer for the specified command. The timeout is usually
 -*   the command time from kernel minus 2 secs.
 -*
 -* Input:
 -* sp - pointer to validate
 -*
 -* Returns:
 -* None.
 -**/
 -static inline void
 -qla2x00_add_timer_to_cmd(srb_t *sp, int timeout)
 -{
 - init_timer(sp-timer);
 - sp-timer.expires = jiffies + timeout * HZ;
 - sp-timer.data = (unsigned long) sp;
 - sp-timer.function = (void (*) (unsigned long))qla2x00_cmd_timeout;
 - add_timer(sp-timer);
 -}
 -
 -/**
 -*   qla2x00_delete_timer_from_cmd
 -*
 -* Description:
 -*   Delete the timer for the specified command.
 -*
 -* Input:
 -* sp - pointer to validate
 -*
 -* Returns:
 -* None.
 -**/
 -static inline void 
 -qla2x00_delete_timer_from_cmd(srb_t *sp)
 -{
 - if (sp-timer.function != NULL) {
 - del_timer(sp-timer);
 - sp-timer.function =  NULL;
 - sp-timer.data = (unsigned long) NULL;
 - }
 -}
 -

these codes will be dropped from the driver.

  /*
   * SRB allocation cache
   */
 -char srb_cachep_name[16];
 -kmem_cache_t *srb_cachep;
 +static char srb_cachep_name[16];
 +static kmem_cache_t *srb_cachep;
  
  /*
   * Stats for all adpaters.
 @@ -47,13 +47,12 @@
  /*
   * Ioctl related information.
   */
 -int num_hosts;
 -int apiHBAInstance;
 +static int num_hosts;
  
  /*
   * Module parameter information and variables
   */
 -int ql2xmaxqdepth;
 +static int ql2xmaxqdepth;
  module_param(ql2xmaxqdepth, int, S_IRUGO|S_IWUSR);
  MODULE_PARM_DESC(ql2xmaxqdepth,
   Maximum queue depth to report for target devices.);
 @@ -69,13 +68,13 @@
   Maximum number of command retries to a port that returns
   a PORT-DOWN status.);
  
 -int ql2xretrycount = 20;
 +static int ql2xretrycount = 20;
  module_param(ql2xretrycount, int, S_IRUGO|S_IWUSR);
  MODULE_PARM_DESC(ql2xretrycount,
   Maximum number of mid-layer retries allowed for a command.  
   Default value is 20, );
  
 -int displayConfig;
 +static int displayConfig;
  module_param(displayConfig, int, S_IRUGO|S_IWUSR);
  MODULE_PARM_DESC(displayConfig,
   If 1 then display the configuration used in 
 /etc/modprobe.conf.);
 @@ -100,7 +99,7 @@
   ZIO: Waiting time for Firmware before it generates an 
   interrupt to the host to notify completion of request.);
  
 -int ConfigRequired;
 +static int ConfigRequired;
  module_param(ConfigRequired, int, S_IRUGO|S_IRUSR);
  MODULE_PARM_DESC(ConfigRequired,
   If 1, then only configured devices passed in through the
 @@ -119,7 +118,7 @@
   target returns a NOT READY status.  Default is 10 
   iterations.);
  
 -int ql2xdoinitscan = 1;
 +static int ql2xdoinitscan = 1;
  module_param(ql2xdoinitscan, int, S_IRUGO|S_IWUSR);
  MODULE_PARM_DESC(ql2xdoinitscan,
   Signal mid-layer to perform scan after driver load: 0 -- no 
 @@ -163,6 +162,8 @@

I'll queue-up these for the next set of patches.

Thanks,
Andrew Vasquez
-
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_transport_fc.c: #0 unused code

2005-02-28 Thread Adrian Bunk
This patch #if 0's the following EXPORT_SYMBOL'ed but unused functions:
- fc_target_block
- fc_target_unblock
- fc_host_block
- fc_host_unblock

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

---

If the inclusion of code using these functions into the kernel is 
pending, please ignore my patch.

 drivers/scsi/scsi_transport_fc.c |   10 ++
 include/scsi/scsi_transport_fc.h |4 
 2 files changed, 10 insertions(+), 4 deletions(-)

--- linux-2.6.11-rc4-mm1-full/include/scsi/scsi_transport_fc.h.old  
2005-02-28 20:24:09.0 +0100
+++ linux-2.6.11-rc4-mm1-full/include/scsi/scsi_transport_fc.h  2005-02-28 
20:24:30.0 +0100
@@ -316,9 +316,5 @@
 
 struct scsi_transport_template *fc_attach_transport(struct 
fc_function_template *);
 void fc_release_transport(struct scsi_transport_template *);
-int fc_target_block(struct scsi_target *starget);
-void fc_target_unblock(struct scsi_target *starget);
-int fc_host_block(struct Scsi_Host *shost);
-void fc_host_unblock(struct Scsi_Host *shost);
 
 #endif /* SCSI_TRANSPORT_FC_H */
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi_transport_fc.c.old  
2005-02-28 20:24:39.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi_transport_fc.c  2005-02-28 
20:40:02.0 +0100
@@ -845,10 +845,12 @@
  * @dev:   scsi device
  * @data:  unused
  **/
+#if 0
 static void fc_device_block(struct scsi_device *sdev, void *data)
 {
scsi_internal_device_block(sdev);
 }
+#endif  /*  0  */
 
 /**
  * fc_device_unblock - called by target functions to unblock a scsi device
@@ -880,6 +882,8 @@
starget_for_each_device(starget, NULL, fc_device_unblock);
 }
 
+#if 0
+
 /**
  * fc_target_block - block a target by temporarily putting all its scsi devices
  * into the SDEV_BLOCK state.
@@ -940,6 +944,8 @@
 }
 EXPORT_SYMBOL(fc_target_unblock);
 
+#endif  /*  0  */
+
 /**
  * fc_timeout_blocked_host - Timeout handler for blocked scsi hosts
  *  that fail to recover in the alloted time.
@@ -964,6 +970,8 @@
}
 }
 
+#if 0
+
 /**
  * fc_host_block - block all scsi devices managed by the calling host 
temporarily 
  * by putting each device in the SDEV_BLOCK state.
@@ -1031,6 +1039,8 @@
 }
 EXPORT_SYMBOL(fc_host_unblock);
 
+#endif  /*  0  */
+
 MODULE_AUTHOR(Martin Hicks);
 MODULE_DESCRIPTION(FC Transport Attributes);
 MODULE_LICENSE(GPL);

-
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/sym53c8xx_2/sym_hipd.c: make a function static

2005-02-28 Thread Adrian Bunk
This patch makes a needlessly global function static.

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

---

 drivers/scsi/sym53c8xx_2/sym_hipd.c |2 +-
 drivers/scsi/sym53c8xx_2/sym_hipd.h |1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

--- linux-2.6.11-rc4-mm1-full/drivers/scsi/sym53c8xx_2/sym_hipd.h.old   
2005-02-28 20:29:13.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/sym53c8xx_2/sym_hipd.h   
2005-02-28 20:29:19.0 +0100
@@ -1091,7 +1091,6 @@
 lcb_p sym_alloc_lcb (struct sym_hcb *np, u_char tn, u_char ln);
 int sym_queue_scsiio(struct sym_hcb *np, struct scsi_cmnd *csio, ccb_p cp);
 int sym_abort_scsiio(struct sym_hcb *np, struct scsi_cmnd *ccb, int timed_out);
-int sym_abort_ccb(struct sym_hcb *np, ccb_p cp, int timed_out);
 int sym_reset_scsi_target(struct sym_hcb *np, int target);
 void sym_hcb_free(struct sym_hcb *np);
 int sym_hcb_attach(struct sym_hcb *np, struct sym_fw *fw, struct sym_nvram 
*nvram);
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/sym53c8xx_2/sym_hipd.c.old   
2005-02-28 20:29:27.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/sym53c8xx_2/sym_hipd.c   
2005-02-28 20:29:40.0 +0100
@@ -5351,7 +5351,7 @@
 /*
  *  Abort a SCSI IO.
  */
-int sym_abort_ccb(struct sym_hcb *np, ccb_p cp, int timed_out)
+static int sym_abort_ccb(struct sym_hcb *np, ccb_p cp, int timed_out)
 {
/*
 *  Check that the IO is active.

-
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/scsi_transport_fc.c: #0 unused code

2005-02-28 Thread Christoph Hellwig
On Mon, Feb 28, 2005 at 11:00:20PM +0100, Adrian Bunk wrote:
 This patch #if 0's the following EXPORT_SYMBOL'ed but unused functions:
 - fc_target_block
 - fc_target_unblock
 - fc_host_block
 - fc_host_unblock

A driver using them is scheduled to be merged soon, and at least one
other will be updated to use this.
-
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: possible cleanups

2005-02-28 Thread Christoph Hellwig
On Mon, Feb 28, 2005 at 10:31:59PM +0100, Adrian Bunk wrote:
 Before I'm getting flamed to death:
 This patch contains possible cleanups. If parts of this patch conflict 
 with pending changes these parts of my patch have to be dropped.
 
 This patch contains the following possible cleanups:
 - make needlessly global code static
 - remove or #if 0 the following unused functions:
   - scsi.h: print_driverbyte
   - scsi.h: print_hostbyte

these two please kill.

   - constants.c: scsi_print_hostbyte
   - constants.c: scsi_print_driverbyte

these we'll probably keep for now.

   - scsi_scan.c: scsi_scan_single_target

this one will grow a user soon, but maybe it'll be completely
rewritten before.

 - remove the following unneeded EXPORT_SYMBOL's:
   - constants.c: __scsi_print_sense

this was put in for a drivea and makes sense as API.

   - hosts.c: scsi_host_lookup

we should probably kill this export.

   - scsi.c: scsi_device_cancel
   - scsi_lib.c: scsi_device_resume

dito.

   - scsi_error.c: scsi_normalize_sense
   - scsi_error.c: scsi_sense_desc_find

st is expected to use these soon.

   - scsi_scan.c: scsi_rescan_device

aacraid was going to use that one, Mark, any chance to get a patch
anytime soon?

   - scsi_scan.c: scsi_scan_single_target

as mentioned above we'll need this one soon.
-
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: possible cleanups

2005-02-28 Thread Adrian Bunk
On Mon, Feb 28, 2005 at 10:25:09PM +, Christoph Hellwig wrote:
...
- constants.c: scsi_print_hostbyte
- constants.c: scsi_print_driverbyte
 
 these we'll probably keep for now.
...

keep = #if 0 ?

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: possible cleanups

2005-02-28 Thread Christoph Hellwig
On Tue, Mar 01, 2005 at 12:01:55AM +0100, Adrian Bunk wrote:
 On Mon, Feb 28, 2005 at 10:25:09PM +, Christoph Hellwig wrote:
 ...
 - constants.c: scsi_print_hostbyte
 - constants.c: scsi_print_driverbyte
  
  these we'll probably keep for now.
 ...
 
 keep = #if 0 ?

In this case yes, for the others case I want to keep them beeing built.
-
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: cleanups

2005-02-28 Thread Adrian Bunk
Updated patch:

--  snip  --

This patch contains the following cleanups:
- make needlessly global code static
- remove the following unused functions:
  - scsi.h: print_driverbyte
  - scsi.h: print_hostbyte
- #if 0 the following unused functions:
  - constants.c: scsi_print_hostbyte
  - constants.c: scsi_print_driverbyte
- remove the following unneeded EXPORT_SYMBOL's:
  - hosts.c: scsi_host_lookup
  - scsi.c: scsi_device_cancel
  - scsi_lib.c: scsi_device_resume

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

---

 drivers/scsi/constants.c   |4 
 drivers/scsi/hosts.c   |3 +--
 drivers/scsi/scsi.c|9 +
 drivers/scsi/scsi.h|8 
 drivers/scsi/scsi_debug.c  |2 +-
 drivers/scsi/scsi_lib.c|5 ++---
 drivers/scsi/scsi_priv.h   |4 
 drivers/scsi/scsi_sysfs.c  |4 ++--
 include/scsi/scsi_dbg.h|2 --
 include/scsi/scsi_device.h |1 -
 10 files changed, 15 insertions(+), 27 deletions(-)

--- linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi.h.old   2005-02-28 
18:18:22.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi.h   2005-03-01 
00:58:19.0 +0100
@@ -80,14 +80,6 @@
 {
return scsi_print_req_sense(devclass, req);
 }
-static inline void print_driverbyte(int scsiresult)
-{
-   return scsi_print_driverbyte(scsiresult);
-}
-static inline void print_hostbyte(int scsiresult)
-{
-   return scsi_print_hostbyte(scsiresult);
-}
 static inline void print_status(unsigned char status)
 {
return scsi_print_status(status);
--- linux-2.6.11-rc4-mm1-full/include/scsi/scsi_dbg.h.old   2005-02-28 
18:17:32.0 +0100
+++ linux-2.6.11-rc4-mm1-full/include/scsi/scsi_dbg.h   2005-03-01 
01:01:25.0 +0100
@@ -11,8 +11,6 @@
 extern void __scsi_print_sense(const char *name,
   const unsigned char *sense_buffer,
   int sense_len);
-extern void scsi_print_driverbyte(int);
-extern void scsi_print_hostbyte(int);
 extern void scsi_print_status(unsigned char);
 extern int scsi_print_msg(const unsigned char *);
 extern const char *scsi_sense_key_string(unsigned char);
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/constants.c.old  2005-02-28 
18:17:46.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/constants.c  2005-03-01 
01:00:37.0 +0100
@@ -1393,6 +1393,8 @@
 }
 EXPORT_SYMBOL(scsi_print_command);
 
+#if 0
+
 #ifdef CONFIG_SCSI_CONSTANTS
 
 static const char * hostbyte_table[]={
@@ -1446,3 +1448,5 @@
printk(Driverbyte=0x%02x , driver_byte(scsiresult));
 }
 #endif
+
+#endif  /*  0  */
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/hosts.c.old  2005-02-28 
18:33:14.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/hosts.c  2005-03-01 
00:58:19.0 +0100
@@ -56,7 +56,7 @@
  * @shost: pointer to struct Scsi_Host
  * recovery:   recovery requested to run.
  **/
-void scsi_host_cancel(struct Scsi_Host *shost, int recovery)
+static void scsi_host_cancel(struct Scsi_Host *shost, int recovery)
 {
struct scsi_device *sdev;
 
@@ -362,7 +362,6 @@
 
return shost;
 }
-EXPORT_SYMBOL(scsi_host_lookup);
 
 /**
  * scsi_host_get - inc a Scsi_Host ref count
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi_priv.h.old  2005-02-28 
19:59:30.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi_priv.h  2005-03-01 
00:58:19.0 +0100
@@ -66,8 +66,6 @@
 extern int scsi_dispatch_cmd(struct scsi_cmnd *cmd);
 extern int scsi_setup_command_freelist(struct Scsi_Host *shost);
 extern void scsi_destroy_command_freelist(struct Scsi_Host *shost);
-extern void scsi_done(struct scsi_cmnd *cmd);
-extern int scsi_retry_command(struct scsi_cmnd *cmd);
 extern int scsi_insert_special_req(struct scsi_request *sreq, int);
 extern void scsi_init_cmd_from_req(struct scsi_cmnd *cmd,
struct scsi_request *sreq);
@@ -141,7 +139,6 @@
 #endif /* CONFIG_SYSCTL */
 
 /* scsi_sysfs.c */
-extern void scsi_device_dev_release(struct device *);
 extern int scsi_sysfs_add_sdev(struct scsi_device *);
 extern int scsi_sysfs_add_host(struct Scsi_Host *);
 extern int scsi_sysfs_register(void);
@@ -150,7 +147,6 @@
 extern int scsi_sysfs_target_initialize(struct scsi_device *);
 extern struct scsi_transport_template blank_transport_template;
 
-extern struct class sdev_class;
 extern struct bus_type scsi_bus_type;
 
 /* 
--- linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi.c.old   2005-02-28 
19:59:56.0 +0100
+++ linux-2.6.11-rc4-mm1-full/drivers/scsi/scsi.c   2005-03-01 
00:58:19.0 +0100
@@ -68,6 +68,8 @@
 #include scsi_priv.h
 #include scsi_logging.h
 
+static void scsi_done(struct scsi_cmnd *cmd);
+static int scsi_retry_command(struct scsi_cmnd *cmd);
 
 /*
  * Definitions and constants.
@@ -90,7 +92,7 @@
 /*
  * Data declarations.
  */
-unsigned long scsi_pid;
+static unsigned long scsi_pid;
 static unsigned long serial_number;
 
 /*
@@ -733,7 +735,7 @@
  *
  * This function is interrupt 

Re: [Patch] QLogic qla2x00 driver fixes

2005-02-28 Thread Doug Ledford
On Fri, 2005-02-25 at 09:02 -0800, Patrick Mansfield wrote:
 On Fri, Feb 25, 2005 at 06:57:39AM -0500, Doug Ledford wrote:
  On Fri, 2005-02-25 at 03:38 -0500, Jeff Garzik wrote:
   Arjan van de Ven wrote:
On Thu, 2005-02-24 at 23:21 -0500, Doug Ledford wrote:

   Don't use cmd-request-nr_hw_segments as it may not be initialized
   (SG_IO in particular bypasses anything that initializes this and just
   uses scsi_do_req to insert a scsi_request directly on the head of the
   queue) 


should we fix that in the SG_IO layer ?
   
   Possibly/probably.
 
 Doug,
 
 What kernel did you hit this with? 

Our RHEL4 kernel (2.6.9 plus bunches-o'-patches)

 And same question as Doug G: is it via sg (not the block SG_IO)? sg uses
 scsi_do_req(), block SG_IO doesn't.

At the moment, I'm sorting that out.  It's a bit of a black box.  We
have two different loops of commands running on my test machine.  There
are 10 instances of:

while true; do scsiinfo -i /dev/sdf; done 

which sends an INQUIRY request to the target device.  I'm running into a
problem getting an strace from this command, so I'm tell you more when I
can.

The other 10 loops are:

while true; do scsi_id -g -s /block/sdf -p 0x80; done

 Jens sent changes last August or so that fixed SG_IO (not sg) to always
 set nr_hw_segments, change should be in 2.6.10. It is not obvious that his
 change fixed this, I can't find the changeset or log.

Finding out if this is fixed is only greatly complicated by the fact
that there exists a drivers/block/scsi_ioctl.c and
drivers/scsi/scsi_ioctl.c and they both are compiled into the kernel, so
knowing which one is actually being used, codepath wise, can be
confusing.  Then on top of that there's drivers/scsi/sg.c with it's
SG_IO path.  It's not necessarily an easy issue to sort out without that
strace and for some reason strace is locking on the test box I'm
running.

(insert delay as we get the strace issue resolved)

OK, the program that's causing the problem, from what I can tell, is
opening /dev/sdf and then issuing a SCSI_IOCTL_SEND_COMMAND request.
That means we go to scsi/sd.c:sd_ioctl to
block/scsi_ioctl.c:scsi_cmd_ioctl to block/scsi_ioctl.c:sg_scsi_ioctl
and it's on that path that we aren't always getting an initialized
nr_hw_segments.

/me votes for consolidating some of this ioctl mess if at all possible.

-- 
Doug Ledford [EMAIL PROTECTED]
http://people.redhat.com/dledford

-
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


[ANNOUNCE] iSCSI enterprise target software

2005-02-28 Thread FUJITA Tomonori
Hi,

I would like to announce the iSCSI enterprise target (IET) software,
which is open-source software to build iSCSI storage systems. It can
provide disk volumes to iSCSI initiators by using any kinds of files
(regular files, block devices, virtual block devices like RAID and
LVM, etc). The project was started by forking the Ardis target
implementation (http://www.ardistech.com/iscsi/) about one year
ago. The source code and further information are available from:

http://iscsitarget.sourceforge.net/

The user-space daemon handles authentication and the kernel threads
take care of network and disk I/O requests from initiators by using
the VFS interface. The kernel-space code is not intrusive. It doesn't
touch other parts of the kernel. The code is already stable and
usable. More than 130 people currently subscribe to the project's
mailing list. The developers aim for inclusion into the mainline
kernel.

The latest code against 2.6.11-rc5 for review can be found at:

http://zaal.org/iscsi/iet/0.4.6/r996.tar.gz

Could you please review the code? Any comments are greatly
appreciated.
-
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