diff options
author | James Bottomley <James.Bottomley@suse.de> | 2011-01-23 09:19:00 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-01-24 13:05:38 -0500 |
commit | 96db6fa992570bfa46da8428fa466ee6b18e39d6 (patch) | |
tree | e0a4a7ce562ba967850bad259b4952a738f0093f /drivers/scsi/libsas | |
parent | 75c0b3867b3d3ed17142888cd4f334fbee20e3f7 (diff) |
[SCSI] libsas: convert to standard kernel debugging
Instead of using a config option for debugging, just dump the
messages with KERN_DEBUG.
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libsas')
-rw-r--r-- | drivers/scsi/libsas/Kconfig | 8 | ||||
-rw-r--r-- | drivers/scsi/libsas/Makefile | 4 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_dump.c | 4 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_dump.h | 12 | ||||
-rw-r--r-- | drivers/scsi/libsas/sas_internal.h | 6 |
5 files changed, 1 insertions, 33 deletions
diff --git a/drivers/scsi/libsas/Kconfig b/drivers/scsi/libsas/Kconfig index 18f33cd54411..9dafe64e7c7a 100644 --- a/drivers/scsi/libsas/Kconfig +++ b/drivers/scsi/libsas/Kconfig | |||
@@ -46,11 +46,3 @@ config SCSI_SAS_HOST_SMP | |||
46 | Allows sas hosts to receive SMP frames. Selecting this | 46 | Allows sas hosts to receive SMP frames. Selecting this |
47 | option builds an SMP interpreter into libsas. Say | 47 | option builds an SMP interpreter into libsas. Say |
48 | N here if you want to save the few kb this consumes. | 48 | N here if you want to save the few kb this consumes. |
49 | |||
50 | config SCSI_SAS_LIBSAS_DEBUG | ||
51 | bool "Compile the SAS Domain Transport Attributes in debug mode" | ||
52 | default y | ||
53 | depends on SCSI_SAS_LIBSAS | ||
54 | help | ||
55 | Compiles the SAS Layer in debug mode. In debug mode, the | ||
56 | SAS Layer prints diagnostic and debug messages. | ||
diff --git a/drivers/scsi/libsas/Makefile b/drivers/scsi/libsas/Makefile index 1ad1323c60fa..566a10024598 100644 --- a/drivers/scsi/libsas/Makefile +++ b/drivers/scsi/libsas/Makefile | |||
@@ -21,10 +21,6 @@ | |||
21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
22 | # USA | 22 | # USA |
23 | 23 | ||
24 | ifeq ($(CONFIG_SCSI_SAS_LIBSAS_DEBUG),y) | ||
25 | EXTRA_CFLAGS += -DSAS_DEBUG | ||
26 | endif | ||
27 | |||
28 | obj-$(CONFIG_SCSI_SAS_LIBSAS) += libsas.o | 24 | obj-$(CONFIG_SCSI_SAS_LIBSAS) += libsas.o |
29 | libsas-y += sas_init.o \ | 25 | libsas-y += sas_init.o \ |
30 | sas_phy.o \ | 26 | sas_phy.o \ |
diff --git a/drivers/scsi/libsas/sas_dump.c b/drivers/scsi/libsas/sas_dump.c index c17c25030f1c..fc460933575c 100644 --- a/drivers/scsi/libsas/sas_dump.c +++ b/drivers/scsi/libsas/sas_dump.c | |||
@@ -24,8 +24,6 @@ | |||
24 | 24 | ||
25 | #include "sas_dump.h" | 25 | #include "sas_dump.h" |
26 | 26 | ||
27 | #ifdef SAS_DEBUG | ||
28 | |||
29 | static const char *sas_hae_str[] = { | 27 | static const char *sas_hae_str[] = { |
30 | [0] = "HAE_RESET", | 28 | [0] = "HAE_RESET", |
31 | }; | 29 | }; |
@@ -72,5 +70,3 @@ void sas_dump_port(struct asd_sas_port *port) | |||
72 | SAS_DPRINTK("port%d: oob_mode:0x%x\n", port->id, port->oob_mode); | 70 | SAS_DPRINTK("port%d: oob_mode:0x%x\n", port->id, port->oob_mode); |
73 | SAS_DPRINTK("port%d: num_phys:%d\n", port->id, port->num_phys); | 71 | SAS_DPRINTK("port%d: num_phys:%d\n", port->id, port->num_phys); |
74 | } | 72 | } |
75 | |||
76 | #endif /* SAS_DEBUG */ | ||
diff --git a/drivers/scsi/libsas/sas_dump.h b/drivers/scsi/libsas/sas_dump.h index 47b45d4f5258..800e4c69093f 100644 --- a/drivers/scsi/libsas/sas_dump.h +++ b/drivers/scsi/libsas/sas_dump.h | |||
@@ -24,19 +24,7 @@ | |||
24 | 24 | ||
25 | #include "sas_internal.h" | 25 | #include "sas_internal.h" |
26 | 26 | ||
27 | #ifdef SAS_DEBUG | ||
28 | |||
29 | void sas_dprint_porte(int phyid, enum port_event pe); | 27 | void sas_dprint_porte(int phyid, enum port_event pe); |
30 | void sas_dprint_phye(int phyid, enum phy_event pe); | 28 | void sas_dprint_phye(int phyid, enum phy_event pe); |
31 | void sas_dprint_hae(struct sas_ha_struct *sas_ha, enum ha_event he); | 29 | void sas_dprint_hae(struct sas_ha_struct *sas_ha, enum ha_event he); |
32 | void sas_dump_port(struct asd_sas_port *port); | 30 | void sas_dump_port(struct asd_sas_port *port); |
33 | |||
34 | #else /* SAS_DEBUG */ | ||
35 | |||
36 | static inline void sas_dprint_porte(int phyid, enum port_event pe) { } | ||
37 | static inline void sas_dprint_phye(int phyid, enum phy_event pe) { } | ||
38 | static inline void sas_dprint_hae(struct sas_ha_struct *sas_ha, | ||
39 | enum ha_event he) { } | ||
40 | static inline void sas_dump_port(struct asd_sas_port *port) { } | ||
41 | |||
42 | #endif /* SAS_DEBUG */ | ||
diff --git a/drivers/scsi/libsas/sas_internal.h b/drivers/scsi/libsas/sas_internal.h index 0001374bd6b2..8b538bd1ff2b 100644 --- a/drivers/scsi/libsas/sas_internal.h +++ b/drivers/scsi/libsas/sas_internal.h | |||
@@ -33,11 +33,7 @@ | |||
33 | 33 | ||
34 | #define sas_printk(fmt, ...) printk(KERN_NOTICE "sas: " fmt, ## __VA_ARGS__) | 34 | #define sas_printk(fmt, ...) printk(KERN_NOTICE "sas: " fmt, ## __VA_ARGS__) |
35 | 35 | ||
36 | #ifdef SAS_DEBUG | 36 | #define SAS_DPRINTK(fmt, ...) printk(KERN_DEBUG "sas: " fmt, ## __VA_ARGS__) |
37 | #define SAS_DPRINTK(fmt, ...) printk(KERN_NOTICE "sas: " fmt, ## __VA_ARGS__) | ||
38 | #else | ||
39 | #define SAS_DPRINTK(fmt, ...) | ||
40 | #endif | ||
41 | 37 | ||
42 | #define TO_SAS_TASK(_scsi_cmd) ((void *)(_scsi_cmd)->host_scribble) | 38 | #define TO_SAS_TASK(_scsi_cmd) ((void *)(_scsi_cmd)->host_scribble) |
43 | #define ASSIGN_SAS_TASK(_sc, _t) do { (_sc)->host_scribble = (void *) _t; } while (0) | 39 | #define ASSIGN_SAS_TASK(_sc, _t) do { (_sc)->host_scribble = (void *) _t; } while (0) |