aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@suse.de>2011-01-23 09:19:00 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-01-24 13:05:38 -0500
commit96db6fa992570bfa46da8428fa466ee6b18e39d6 (patch)
treee0a4a7ce562ba967850bad259b4952a738f0093f /drivers/scsi/libsas
parent75c0b3867b3d3ed17142888cd4f334fbee20e3f7 (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/Kconfig8
-rw-r--r--drivers/scsi/libsas/Makefile4
-rw-r--r--drivers/scsi/libsas/sas_dump.c4
-rw-r--r--drivers/scsi/libsas/sas_dump.h12
-rw-r--r--drivers/scsi/libsas/sas_internal.h6
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
50config 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
24ifeq ($(CONFIG_SCSI_SAS_LIBSAS_DEBUG),y)
25 EXTRA_CFLAGS += -DSAS_DEBUG
26endif
27
28obj-$(CONFIG_SCSI_SAS_LIBSAS) += libsas.o 24obj-$(CONFIG_SCSI_SAS_LIBSAS) += libsas.o
29libsas-y += sas_init.o \ 25libsas-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
29static const char *sas_hae_str[] = { 27static 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
29void sas_dprint_porte(int phyid, enum port_event pe); 27void sas_dprint_porte(int phyid, enum port_event pe);
30void sas_dprint_phye(int phyid, enum phy_event pe); 28void sas_dprint_phye(int phyid, enum phy_event pe);
31void sas_dprint_hae(struct sas_ha_struct *sas_ha, enum ha_event he); 29void sas_dprint_hae(struct sas_ha_struct *sas_ha, enum ha_event he);
32void sas_dump_port(struct asd_sas_port *port); 30void sas_dump_port(struct asd_sas_port *port);
33
34#else /* SAS_DEBUG */
35
36static inline void sas_dprint_porte(int phyid, enum port_event pe) { }
37static inline void sas_dprint_phye(int phyid, enum phy_event pe) { }
38static inline void sas_dprint_hae(struct sas_ha_struct *sas_ha,
39 enum ha_event he) { }
40static 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)