diff options
Diffstat (limited to 'drivers/scsi/aic7xxx')
-rw-r--r-- | drivers/scsi/aic7xxx/Makefile | 45 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.c | 6 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 6 |
3 files changed, 24 insertions, 33 deletions
diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile index 9a6ce19a4030..e4f70c563bc2 100644 --- a/drivers/scsi/aic7xxx/Makefile +++ b/drivers/scsi/aic7xxx/Makefile | |||
@@ -33,11 +33,10 @@ aic79xx-y += aic79xx_osm.o \ | |||
33 | aic79xx_proc.o \ | 33 | aic79xx_proc.o \ |
34 | aic79xx_osm_pci.o | 34 | aic79xx_osm_pci.o |
35 | 35 | ||
36 | EXTRA_CFLAGS += -Idrivers/scsi | 36 | ccflags-y += -Idrivers/scsi |
37 | ifdef WARNINGS_BECOME_ERRORS | 37 | ifdef WARNINGS_BECOME_ERRORS |
38 | EXTRA_CFLAGS += -Werror | 38 | ccflags-y += -Werror |
39 | endif | 39 | endif |
40 | #EXTRA_CFLAGS += -g | ||
41 | 40 | ||
42 | # Files generated that shall be removed upon make clean | 41 | # Files generated that shall be removed upon make clean |
43 | clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c | 42 | clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c |
@@ -46,53 +45,45 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c | |||
46 | # Dependencies for generated files need to be listed explicitly | 45 | # Dependencies for generated files need to be listed explicitly |
47 | 46 | ||
48 | $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h | 47 | $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h |
48 | $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_reg.h | ||
49 | $(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h | 49 | $(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h |
50 | $(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped | 50 | $(obj)/aic79xx_core.o: $(obj)/aic79xx_reg.h |
51 | $(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped | ||
52 | 51 | ||
53 | $(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_reg.h | 52 | $(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h |
54 | $(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_reg.h | 53 | $(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h |
55 | 54 | ||
56 | aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_seq.h \ | 55 | aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h |
57 | $(obj)/aic7xxx_reg.h | ||
58 | aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c | 56 | aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c |
59 | 57 | ||
60 | aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \ | 58 | aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \ |
61 | -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h | 59 | -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h |
62 | 60 | ||
63 | ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) | 61 | ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) |
64 | # Create a dependency chain in generated files | 62 | $(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm |
65 | # to avoid concurrent invocations of the single | ||
66 | # rule that builds them all. | ||
67 | aic7xxx_seq.h: aic7xxx_reg.h | ||
68 | ifeq ($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y) | ||
69 | aic7xxx_reg.h: aic7xxx_reg_print.c | ||
70 | endif | ||
71 | $(aic7xxx-gen-y): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm | ||
72 | $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \ | 63 | $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \ |
73 | $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ | 64 | $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ |
74 | $(src)/aic7xxx.seq | 65 | $(src)/aic7xxx.seq |
66 | |||
67 | $(aic7xxx-gen-y): $(obj)/aic7xxx_seq.h | ||
68 | else | ||
69 | $(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped | ||
75 | endif | 70 | endif |
76 | 71 | ||
77 | aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_seq.h \ | 72 | aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_reg.h |
78 | $(obj)/aic79xx_reg.h | ||
79 | aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c | 73 | aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c |
80 | 74 | ||
81 | aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \ | 75 | aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \ |
82 | -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h | 76 | -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h |
83 | 77 | ||
84 | ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) | 78 | ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) |
85 | # Create a dependency chain in generated files | 79 | $(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm |
86 | # to avoid concurrent invocations of the single | ||
87 | # rule that builds them all. | ||
88 | aic79xx_seq.h: aic79xx_reg.h | ||
89 | ifeq ($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y) | ||
90 | aic79xx_reg.h: aic79xx_reg_print.c | ||
91 | endif | ||
92 | $(aic79xx-gen-y): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm | ||
93 | $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \ | 80 | $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \ |
94 | $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ | 81 | $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ |
95 | $(src)/aic79xx.seq | 82 | $(src)/aic79xx.seq |
83 | |||
84 | $(aic79xx-gen-y): $(obj)/aic79xx_seq.h | ||
85 | else | ||
86 | $(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped | ||
96 | endif | 87 | endif |
97 | 88 | ||
98 | $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] | 89 | $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] |
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 2d020405480c..0e4708fd43c8 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -1784,7 +1784,7 @@ ahd_linux_handle_scsi_status(struct ahd_softc *ahd, | |||
1784 | if (scb->flags & SCB_SENSE) { | 1784 | if (scb->flags & SCB_SENSE) { |
1785 | sense_size = min(sizeof(struct scsi_sense_data) | 1785 | sense_size = min(sizeof(struct scsi_sense_data) |
1786 | - ahd_get_sense_residual(scb), | 1786 | - ahd_get_sense_residual(scb), |
1787 | (u_long)sizeof(cmd->sense_buffer)); | 1787 | (u_long)SCSI_SENSE_BUFFERSIZE); |
1788 | sense_offset = 0; | 1788 | sense_offset = 0; |
1789 | } else { | 1789 | } else { |
1790 | /* | 1790 | /* |
@@ -1795,11 +1795,11 @@ ahd_linux_handle_scsi_status(struct ahd_softc *ahd, | |||
1795 | scb->sense_data; | 1795 | scb->sense_data; |
1796 | sense_size = min_t(size_t, | 1796 | sense_size = min_t(size_t, |
1797 | scsi_4btoul(siu->sense_length), | 1797 | scsi_4btoul(siu->sense_length), |
1798 | sizeof(cmd->sense_buffer)); | 1798 | SCSI_SENSE_BUFFERSIZE); |
1799 | sense_offset = SIU_SENSE_OFFSET(siu); | 1799 | sense_offset = SIU_SENSE_OFFSET(siu); |
1800 | } | 1800 | } |
1801 | 1801 | ||
1802 | memset(cmd->sense_buffer, 0, sizeof(cmd->sense_buffer)); | 1802 | memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); |
1803 | memcpy(cmd->sense_buffer, | 1803 | memcpy(cmd->sense_buffer, |
1804 | ahd_get_sense_buf(ahd, scb) | 1804 | ahd_get_sense_buf(ahd, scb) |
1805 | + sense_offset, sense_size); | 1805 | + sense_offset, sense_size); |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 390b0fc991c5..e310e414067f 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -1801,12 +1801,12 @@ ahc_linux_handle_scsi_status(struct ahc_softc *ahc, | |||
1801 | 1801 | ||
1802 | sense_size = min(sizeof(struct scsi_sense_data) | 1802 | sense_size = min(sizeof(struct scsi_sense_data) |
1803 | - ahc_get_sense_residual(scb), | 1803 | - ahc_get_sense_residual(scb), |
1804 | (u_long)sizeof(cmd->sense_buffer)); | 1804 | (u_long)SCSI_SENSE_BUFFERSIZE); |
1805 | memcpy(cmd->sense_buffer, | 1805 | memcpy(cmd->sense_buffer, |
1806 | ahc_get_sense_buf(ahc, scb), sense_size); | 1806 | ahc_get_sense_buf(ahc, scb), sense_size); |
1807 | if (sense_size < sizeof(cmd->sense_buffer)) | 1807 | if (sense_size < SCSI_SENSE_BUFFERSIZE) |
1808 | memset(&cmd->sense_buffer[sense_size], 0, | 1808 | memset(&cmd->sense_buffer[sense_size], 0, |
1809 | sizeof(cmd->sense_buffer) - sense_size); | 1809 | SCSI_SENSE_BUFFERSIZE - sense_size); |
1810 | cmd->result |= (DRIVER_SENSE << 24); | 1810 | cmd->result |= (DRIVER_SENSE << 24); |
1811 | #ifdef AHC_DEBUG | 1811 | #ifdef AHC_DEBUG |
1812 | if (ahc_debug & AHC_SHOW_SENSE) { | 1812 | if (ahc_debug & AHC_SHOW_SENSE) { |