* [PATCH 0/3] debloat aic7xxx and aic79xx drivers
@ 2008-03-23 3:40 Denys Vlasenko
2008-03-23 3:41 ` [PATCH 1/3] " Denys Vlasenko
0 siblings, 1 reply; 24+ messages in thread
From: Denys Vlasenko @ 2008-03-23 3:40 UTC (permalink / raw)
To: Andrew Morton; +Cc: Hannes Reinecke, linux-scsi, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2428 bytes --]
Hi Andrew,
Can you please take these patches into -mm?
I seem to be unable to push them through scsi people,
they silently drop them on the floor.
There patches significantly debloat drivers/scsi/aic7xxx/*.
1-debloat.patch
Deinlines and moves big functions from .h to .c files.
Adds prototypes for ahc_lookup_scb and ahd_lookup_scb to .h files.
2-addstatic.patch
Adds statics, #ifdefs out huge amount of unused code, adds consts
3-addconst.patch
Adds more consts
Driver code/data size reductions with and without debugging enabled
(aic0 is just an unmodified linux-2.6.25-rc6):
text data bss dec hex filename
211264 28258 1172 240694 3ac36 linux-2.6.25-rc6-aic0-TEST/drivers/scsi/aic7xxx/built-in.o
160012 28258 1172 189442 2e402 linux-2.6.25-rc6-aic1-TEST/drivers/scsi/aic7xxx/built-in.o
166698 20786 1172 188656 2e0f0 linux-2.6.25-rc6-aic2-TEST/drivers/scsi/aic7xxx/built-in.o
185014 2346 1172 188532 2e074 linux-2.6.25-rc6-aic3-TEST/drivers/scsi/aic7xxx/built-in.o
text data bss dec hex filename
264496 47922 1188 313606 4c906 linux-2.6.25-rc6-aic0-TEST2/drivers/scsi/aic7xxx/built-in.o
201056 47922 1188 250166 3d136 linux-2.6.25-rc6-aic1-TEST2/drivers/scsi/aic7xxx/built-in.o
186564 20786 1188 208538 32e9a linux-2.6.25-rc6-aic2-TEST2/drivers/scsi/aic7xxx/built-in.o
204880 2346 1188 208414 32e1e linux-2.6.25-rc6-aic3-TEST2/drivers/scsi/aic7xxx/built-in.o
Configs used for these builds are attached to this email
for anyone interested.
make namespacecheck goes from 400+ functions to:
drivers/scsi/aic7xxx/aic79xx_core.o
ahd_inq
ahd_inw
ahd_outq
ahd_outw
drivers/scsi/aic7xxx/aic79xx_osm.o
ahd_insb
drivers/scsi/aic7xxx/aic7xxx_core.o
ahc_inq
ahc_outq
drivers/scsi/aic7xxx/aic7xxx_osm.o
ahc_insb
None of these patches touch any logic, code changes are pretty minimal.
Compile tested and applies cleanly to 2.6.25-rc6.
I don't have this hardware anymore and cannot run test these patches,
but other people reported success in the past:
On Monday 15 October 2007 14:53, Gabriel C wrote:
> > I can test these patches on an aic7892 controller later on today if you want.
>
> Works fine for me tested on :
>
> 03:0e.0 SCSI storage controller [0100]: Adaptec AIC-7892P U160/m [9005:008f] (rev 02)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
[-- Attachment #2: config-TEST.bz2 --]
[-- Type: application/x-bzip2, Size: 7959 bytes --]
[-- Attachment #3: config-TEST2.bz2 --]
[-- Type: application/x-bzip2, Size: 8058 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread* [PATCH 1/3] debloat aic7xxx and aic79xx drivers 2008-03-23 3:40 [PATCH 0/3] debloat aic7xxx and aic79xx drivers Denys Vlasenko @ 2008-03-23 3:41 ` Denys Vlasenko 2008-03-23 3:42 ` [PATCH 2/3] " Denys Vlasenko 2008-04-07 10:31 ` [PATCH 1/3] " Hannes Reinecke 0 siblings, 2 replies; 24+ messages in thread From: Denys Vlasenko @ 2008-03-23 3:41 UTC (permalink / raw) To: Andrew Morton; +Cc: Hannes Reinecke, linux-scsi, linux-kernel [-- Attachment #1: Type: text/plain, Size: 187 bytes --] Deinlines and moves big functions from .h to .c files. Adds prototypes for ahc_lookup_scb and ahd_lookup_scb to .h files. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> -- vda [-- Attachment #2: linux-2.6.25-rc6-aic1-debloat.diff.bz2 --] [-- Type: application/x-bzip2, Size: 15051 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2008-03-23 3:41 ` [PATCH 1/3] " Denys Vlasenko @ 2008-03-23 3:42 ` Denys Vlasenko 2008-03-23 3:42 ` [PATCH 3/3] " Denys Vlasenko 2008-04-07 10:34 ` [PATCH 2/3] " Hannes Reinecke 2008-04-07 10:31 ` [PATCH 1/3] " Hannes Reinecke 1 sibling, 2 replies; 24+ messages in thread From: Denys Vlasenko @ 2008-03-23 3:42 UTC (permalink / raw) To: Andrew Morton; +Cc: Hannes Reinecke, linux-scsi, linux-kernel [-- Attachment #1: Type: text/plain, Size: 132 bytes --] Adds statics, #ifdefs out huge amount of unused code, adds consts Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> -- vda [-- Attachment #2: linux-2.6.25-rc6-aic2-addstatic.diff.bz2 --] [-- Type: application/x-bzip2, Size: 24690 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 3/3] debloat aic7xxx and aic79xx drivers 2008-03-23 3:42 ` [PATCH 2/3] " Denys Vlasenko @ 2008-03-23 3:42 ` Denys Vlasenko 2008-04-07 10:36 ` Hannes Reinecke 2008-04-07 10:34 ` [PATCH 2/3] " Hannes Reinecke 1 sibling, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2008-03-23 3:42 UTC (permalink / raw) To: Andrew Morton; +Cc: Hannes Reinecke, linux-scsi, linux-kernel [-- Attachment #1: Type: text/plain, Size: 83 bytes --] Adds more consts Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> -- vda [-- Attachment #2: linux-2.6.25-rc6-aic3-addconst.diff.bz2 --] [-- Type: application/x-bzip2, Size: 4781 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] debloat aic7xxx and aic79xx drivers 2008-03-23 3:42 ` [PATCH 3/3] " Denys Vlasenko @ 2008-04-07 10:36 ` Hannes Reinecke 0 siblings, 0 replies; 24+ messages in thread From: Hannes Reinecke @ 2008-04-07 10:36 UTC (permalink / raw) To: Denys Vlasenko; +Cc: Andrew Morton, linux-scsi, linux-kernel Hi Denys, Denys Vlasenko wrote: > Adds more consts > > Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> > -- > vda > ACK. Looks ok. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2008-03-23 3:42 ` [PATCH 2/3] " Denys Vlasenko 2008-03-23 3:42 ` [PATCH 3/3] " Denys Vlasenko @ 2008-04-07 10:34 ` Hannes Reinecke 2008-04-07 18:00 ` Denys Vlasenko 1 sibling, 1 reply; 24+ messages in thread From: Hannes Reinecke @ 2008-04-07 10:34 UTC (permalink / raw) To: Denys Vlasenko; +Cc: Andrew Morton, linux-scsi, linux-kernel Hi Denys, Denys Vlasenko wrote: > Adds statics, #ifdefs out huge amount of unused code, adds consts > > Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> > -- > vda > NACK. We need the #defines to print out the registers. And in either case the *_shipped files are in fact autogenerated by aic assembler, so we need to fix that one, too. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2008-04-07 10:34 ` [PATCH 2/3] " Hannes Reinecke @ 2008-04-07 18:00 ` Denys Vlasenko 2008-04-08 12:23 ` Hannes Reinecke 0 siblings, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2008-04-07 18:00 UTC (permalink / raw) To: Hannes Reinecke; +Cc: Andrew Morton, linux-scsi, linux-kernel [-- Attachment #1: Type: text/plain, Size: 10607 bytes --] On Monday 07 April 2008 12:34, Hannes Reinecke wrote: > > Adds statics, #ifdefs out huge amount of unused code, adds consts > > > > Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> > > -- > > vda > > > NACK. We need the #defines to print out the registers. > And in either case the *_shipped files are in fact > autogenerated by aic assembler, so we need to fix that > one, too. I assume you are talking about this part of a patch: --- linux-2.6.25-rc6-aic1/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped 2008-03-23 00:43:20.000000000 +0100 +++ linux-2.6.25-rc6-aic2/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped 2008-03-23 00:54:59.000000000 +0100 @@ -11,23 +11,18 @@ typedef struct ahd_reg_parse_entry { uint8_t value; uint8_t mask; } ahd_reg_parse_entry_t; +#if 0 /* unused */ + #if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_mode_ptr_print; #else #define ahd_mode_ptr_print(regvalue, cur_col, wrap) \ ahd_print_register(NULL, 0, "MODE_PTR", 0x00, regvalue, cur_col, wrap) #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_intstat_print; -#else -#define ahd_intstat_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "INTSTAT", 0x01, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_seqintcode_print; #else #define ahd_seqintcode_print(regvalue, cur_col, wrap) \ ahd_print_register(NULL, 0, "SEQINTCODE", 0x02, regvalue, cur_col, wrap) @@ -75,22 +70,8 @@ ahd_reg_print_t ahd_hescb_qoff_print; ahd_print_register(NULL, 0, "HESCB_QOFF", 0x08, regvalue, cur_col, wrap) #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_hs_mailbox_print; -#else -#define ahd_hs_mailbox_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "HS_MAILBOX", 0x0b, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_seqintstat_print; -#else -#define ahd_seqintstat_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SEQINTSTAT", 0x0c, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ..... ..... Let me explain what I am doing here. I am NOT deleting ahd_intstat_print definition, I am moving it below the #endif which terminates big #if 0 /* unused */ block, moving to this place: @@ -2377,8 +2043,346 @@ ahd_reg_print_t ahd_scb_disconnected_lis #define ahd_scb_disconnected_lists_print(regvalue, cur_col, wrap) \ ahd_print_register(NULL, 0, "SCB_DISCONNECTED_LISTS", 0x1b8, regvalue, cur_col, wrap) #endif +#endif /* unused */ + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_intstat_print; +#else +#define ahd_intstat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "INTSTAT", 0x01, regvalue, cur_col, wrap) +#endif ... ... #if 0 / #endif block ends up containing definitions of 290 functions/macros, none of which is EVER used. I used this script (below) and verified that they are never mentioned anywhere outside of *_shipped files. I also did test builds with and without debug enabled and they build with no problems. No undefined references! cd $KERNEL_TREE/drivers/scsi/aic7xxx/ || exit 1 echo -n "\ ahd_mode_ptr_print ahd_seqintcode_print ahd_clrint_print ahd_error_print ahd_clrerr_print ahd_hcntrl_print ahd_hnscb_qoff_print ahd_hescb_qoff_print ahd_clrseqintstat_print ahd_swtimer_print ahd_snscb_qoff_print ahd_sescb_qoff_print ahd_sdscb_qoff_print ahd_qoff_ctlsta_print ahd_dscommand0_print ahd_arbctl_print ahd_sg_cache_pre_print ahd_lqin_print ahd_typeptr_print ahd_tagptr_print ahd_lunptr_print ahd_datalenptr_print ahd_statlenptr_print ahd_cmdlenptr_print ahd_attrptr_print ahd_flagptr_print ahd_cmdptr_print ahd_qnextptr_print ahd_idptr_print ahd_abrtbyteptr_print ahd_abrtbitptr_print ahd_maxcmdbytes_print ahd_maxcmd2rcv_print ahd_shortthresh_print ahd_lunlen_print ahd_cdblimit_print ahd_maxcmd_print ahd_maxcmdcnt_print ahd_lqrsvd01_print ahd_lqrsvd16_print ahd_lqrsvd17_print ahd_cmdrsvd0_print ahd_lqctl0_print ahd_lqctl1_print ahd_scsbist0_print ahd_lqctl2_print ahd_scsbist1_print ahd_sxfrctl0_print ahd_dlcount_print ahd_businitid_print ahd_sxfrctl1_print ahd_bustargid_print ahd_sxfrctl2_print ahd_scsisigo_print ahd_multargid_print ahd_scsidat0_img_print ahd_scsidat_print ahd_targidin_print ahd_optionmode_print ahd_sblkctl_print ahd_clrsint0_print ahd_clrsint1_print ahd_simode2_print ahd_clrsint2_print ahd_lqistate_print ahd_lqostate_print ahd_clrlqiint0_print ahd_lqimode0_print ahd_lqimode1_print ahd_clrlqiint1_print ahd_simode3_print ahd_clrsint3_print ahd_clrlqoint0_print ahd_lqomode0_print ahd_lqomode1_print ahd_clrlqoint1_print ahd_os_space_cnt_print ahd_gsfifo_print ahd_lqoscsctl_print ahd_nextscb_print ahd_clrseqintsrc_print ahd_currscb_print ahd_crccontrol_print ahd_dfftag_print ahd_lastscb_print ahd_scsitest_print ahd_iopdnctl_print ahd_shaddr_print ahd_negoaddr_print ahd_dgrpcrci_print ahd_negperiod_print ahd_packcrci_print ahd_negoffset_print ahd_negppropts_print ahd_negconopts_print ahd_annexcol_print ahd_annexdat_print ahd_scschkn_print ahd_iownid_print ahd_pll960ctl0_print ahd_shcnt_print ahd_townid_print ahd_pll960ctl1_print ahd_pll960cnt0_print ahd_xsig_print ahd_pll400ctl0_print ahd_fairness_print ahd_pll400ctl1_print ahd_unfairness_print ahd_pll400cnt0_print ahd_haddr_print ahd_plldelay_print ahd_hodmaadr_print ahd_hodmacnt_print ahd_hcnt_print ahd_hodmaen_print ahd_scbhaddr_print ahd_sghaddr_print ahd_scbhcnt_print ahd_sghcnt_print ahd_dff_thrsh_print ahd_romaddr_print ahd_romcntrl_print ahd_romdata_print ahd_cmcrxmsg0_print ahd_roenable_print ahd_ovlyrxmsg0_print ahd_dchrxmsg0_print ahd_ovlyrxmsg1_print ahd_nsenable_print ahd_cmcrxmsg1_print ahd_dchrxmsg1_print ahd_dchrxmsg2_print ahd_cmcrxmsg2_print ahd_ost_print ahd_ovlyrxmsg2_print ahd_dchrxmsg3_print ahd_ovlyrxmsg3_print ahd_cmcrxmsg3_print ahd_pcixctl_print ahd_ovlyseqbcnt_print ahd_dchseqbcnt_print ahd_cmcseqbcnt_print ahd_cmcspltstat0_print ahd_dchspltstat0_print ahd_ovlyspltstat0_print ahd_cmcspltstat1_print ahd_ovlyspltstat1_print ahd_dchspltstat1_print ahd_sgrxmsg0_print ahd_slvspltoutadr0_print ahd_sgrxmsg1_print ahd_slvspltoutadr1_print ahd_sgrxmsg2_print ahd_slvspltoutadr2_print ahd_sgrxmsg3_print ahd_slvspltoutadr3_print ahd_sgseqbcnt_print ahd_slvspltoutattr0_print ahd_slvspltoutattr1_print ahd_slvspltoutattr2_print ahd_sgspltstat0_print ahd_sgspltstat1_print ahd_sfunct_print ahd_df0pcistat_print ahd_reg0_print ahd_df1pcistat_print ahd_sgpcistat_print ahd_reg1_print ahd_cmcpcistat_print ahd_ovlypcistat_print ahd_reg_isr_print ahd_msipcistat_print ahd_targpcistat_print ahd_data_count_odd_print ahd_scbptr_print ahd_ccscbacnt_print ahd_scbautoptr_print ahd_ccsgaddr_print ahd_ccscbadr_bk_print ahd_ccscbaddr_print ahd_cmc_rambist_print ahd_ccsgram_print ahd_flexadr_print ahd_ccscbram_print ahd_flexcnt_print ahd_flexdmastat_print ahd_flexdata_print ahd_brddat_print ahd_brdctl_print ahd_seeadr_print ahd_seedat_print ahd_seectl_print ahd_seestat_print ahd_scbcnt_print ahd_dfwaddr_print ahd_dspfltrctl_print ahd_dspdatactl_print ahd_dfraddr_print ahd_dspreqctl_print ahd_dspackctl_print ahd_dfdat_print ahd_dspselect_print ahd_wrtbiasctl_print ahd_rcvrbiosctl_print ahd_wrtbiascalc_print ahd_rcvrbiascalc_print ahd_dfptrs_print ahd_skewcalc_print ahd_dfbkptr_print ahd_dfdbctl_print ahd_dfscnt_print ahd_dfbcnt_print ahd_ovlyaddr_print ahd_seqctl1_print ahd_flags_print ahd_seqram_print ahd_prgmcnt_print ahd_accum_print ahd_sindex_print ahd_dindex_print ahd_brkaddr0_print ahd_brkaddr1_print ahd_allones_print ahd_allzeros_print ahd_none_print ahd_sindir_print ahd_dindir_print ahd_function1_print ahd_stack_print ahd_intvec1_addr_print ahd_curaddr_print ahd_lastaddr_print ahd_intvec2_addr_print ahd_longjmp_addr_print ahd_accum_save_print ahd_waiting_scb_tails_print ahd_ahd_pci_config_base_print ahd_sram_base_print ahd_waiting_tid_head_print ahd_waiting_tid_tail_print ahd_next_queued_scb_addr_print ahd_complete_scb_head_print ahd_complete_scb_dmainprog_head_print ahd_complete_dma_scb_head_print ahd_complete_dma_scb_tail_print ahd_complete_on_qfreeze_head_print ahd_msg_out_print ahd_dmaparams_print ahd_saved_scsiid_print ahd_saved_lun_print ahd_qoutfifo_entry_valid_tag_print ahd_kernel_tqinpos_print ahd_tqinpos_print ahd_shared_data_addr_print ahd_qoutfifo_next_addr_print ahd_arg_1_print ahd_arg_2_print ahd_last_msg_print ahd_scsiseq_template_print ahd_initiator_tag_print ahd_allocfifo_scbptr_print ahd_int_coalescing_timer_print ahd_int_coalescing_maxcmds_print ahd_int_coalescing_mincmds_print ahd_cmds_pending_print ahd_int_coalescing_cmdcount_print ahd_local_hs_mailbox_print ahd_cmdsize_table_print ahd_scb_base_print ahd_scb_residual_datacnt_print ahd_scb_residual_sgptr_print ahd_scb_scsi_status_print ahd_scb_target_phases_print ahd_scb_target_data_dir_print ahd_scb_target_itag_print ahd_scb_sense_busaddr_print ahd_scb_tag_print ahd_scb_lun_print ahd_scb_task_attribute_print ahd_scb_cdb_len_print ahd_scb_task_management_print ahd_scb_dataptr_print ahd_scb_datacnt_print ahd_scb_sgptr_print ahd_scb_busaddr_print ahd_scb_next_print ahd_scb_next2_print ahd_scb_spare_print ahd_scb_disconnected_lists_print " | while read name; do grep "$name" -rc . done | grep -vF ':0' I got the following output: ./aic79xx_reg.h_shipped:2 ./aic79xx_reg_print.c_shipped:1 ./aic79xx_reg.h_shipped:2 ./aic79xx_reg_print.c_shipped:1 ... ... which means that these functions are defined but never referenced. (Yes, patch similarly ifdefs out function definitions in aic79xx_reg_print.c_shipped) > And in either case the *_shipped files are in fact > autogenerated by aic assembler, so we need to fix that > one, too. I tried this approach. But running aic assembler doesn't seem to regenerate _shipped files. I built kernel with the following options and none of the *_shipped files change (in fact, no source file changes): # CONFIG_PREVENT_FIRMWARE_BUILD is not set CONFIG_SCSI_AIC7XXX=y CONFIG_AIC7XXX_CMDS_PER_DEVICE=8 CONFIG_AIC7XXX_RESET_DELAY_MS=15000 CONFIG_AIC7XXX_BUILD_FIRMWARE=y <============ CONFIG_AIC7XXX_DEBUG_ENABLE=y CONFIG_AIC7XXX_DEBUG_MASK=0 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y # CONFIG_SCSI_AIC7XXX_OLD is not set CONFIG_SCSI_AIC79XX=y CONFIG_AIC79XX_CMDS_PER_DEVICE=8 CONFIG_AIC79XX_RESET_DELAY_MS=15000 CONFIG_AIC79XX_BUILD_FIRMWARE=y <============ CONFIG_AIC79XX_DEBUG_ENABLE=y CONFIG_AIC79XX_DEBUG_MASK=0 CONFIG_AIC79XX_REG_PRETTY_PRINT=y CONFIG_SCSI_AIC94XX=m CONFIG_AIC94XX_DEBUG=y (full .config is attached) I also grepped through the directory and found no rules in Makefiles which regenerate _shipped files. If you know how to regenerate them, please let me know. Any other objections to the patch? -- vda [-- Attachment #2: .config --] [-- Type: text/plain, Size: 36183 bytes --] # # Automatically generated make config: don't edit # Linux kernel version: 2.6.25-rc6 # Mon Apr 7 19:46:37 2008 # CONFIG_64BIT=y # CONFIG_X86_32 is not set CONFIG_X86_64=y CONFIG_X86=y # CONFIG_GENERIC_LOCKBREAK is not set CONFIG_GENERIC_TIME=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_FAST_CMPXCHG_LOCAL=y CONFIG_MMU=y CONFIG_ZONE_DMA=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_HWEIGHT=y # CONFIG_GENERIC_GPIO is not set CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set # CONFIG_ARCH_HAS_ILOG2_U32 is not set # CONFIG_ARCH_HAS_ILOG2_U64 is not set CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ZONE_DMA32=y CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_AUDIT_ARCH=y CONFIG_ARCH_SUPPORTS_AOUT=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_X86_SMP=y CONFIG_X86_64_SMP=y CONFIG_X86_TRAMPOLINE=y # CONFIG_KTIME_SCALAR is not set CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # General setup # CONFIG_EXPERIMENTAL=y CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set # CONFIG_TASKSTATS is not set # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_CGROUPS is not set CONFIG_GROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y # CONFIG_RT_GROUP_SCHED is not set CONFIG_USER_SCHED=y # CONFIG_CGROUP_SCHED is not set CONFIG_SYSFS_DEPRECATED=y CONFIG_SYSFS_DEPRECATED_V2=y CONFIG_RELAY=y # CONFIG_NAMESPACES is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_EMBEDDED=y CONFIG_UID16=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_COMPAT_BRK=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLAB=y # CONFIG_SLUB is not set # CONFIG_SLOB is not set CONFIG_PROFILING=y # CONFIG_MARKERS is not set CONFIG_OPROFILE=m CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_PROC_PAGE_MONITOR=y CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_MODVERSIONS=y # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y CONFIG_STOP_MACHINE=y CONFIG_BLOCK=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_BLK_DEV_BSG is not set CONFIG_BLOCK_COMPAT=y # # IO Schedulers # CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_DEADLINE is not set # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="anticipatory" CONFIG_CLASSIC_RCU=y # # Processor type and features # CONFIG_TICK_ONESHOT=y # CONFIG_NO_HZ is not set CONFIG_HIGH_RES_TIMERS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_SMP=y CONFIG_X86_PC=y # CONFIG_X86_ELAN is not set # CONFIG_X86_VOYAGER is not set # CONFIG_X86_NUMAQ is not set # CONFIG_X86_SUMMIT is not set # CONFIG_X86_BIGSMP is not set # CONFIG_X86_VISWS is not set # CONFIG_X86_GENERICARCH is not set # CONFIG_X86_ES7000 is not set # CONFIG_X86_RDC321X is not set # CONFIG_X86_VSMP is not set # CONFIG_PARAVIRT_GUEST is not set # CONFIG_M386 is not set # CONFIG_M486 is not set # CONFIG_M586 is not set # CONFIG_M586TSC is not set # CONFIG_M586MMX is not set # CONFIG_M686 is not set # CONFIG_MPENTIUMII is not set # CONFIG_MPENTIUMIII is not set # CONFIG_MPENTIUMM is not set # CONFIG_MPENTIUM4 is not set # CONFIG_MK6 is not set # CONFIG_MK7 is not set CONFIG_MK8=y # CONFIG_MCRUSOE is not set # CONFIG_MEFFICEON is not set # CONFIG_MWINCHIPC6 is not set # CONFIG_MWINCHIP2 is not set # CONFIG_MWINCHIP3D is not set # CONFIG_MGEODEGX1 is not set # CONFIG_MGEODE_LX is not set # CONFIG_MCYRIXIII is not set # CONFIG_MVIAC3_2 is not set # CONFIG_MVIAC7 is not set # CONFIG_MPSC is not set # CONFIG_MCORE2 is not set # CONFIG_GENERIC_CPU is not set CONFIG_X86_L1_CACHE_BYTES=64 CONFIG_X86_INTERNODE_CACHE_BYTES=64 CONFIG_X86_CMPXCHG=y CONFIG_X86_L1_CACHE_SHIFT=6 CONFIG_X86_GOOD_APIC=y CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y CONFIG_X86_TSC=y CONFIG_X86_MINIMUM_CPU_FAMILY=64 CONFIG_X86_DEBUGCTLMSR=y CONFIG_HPET_TIMER=y CONFIG_GART_IOMMU=y CONFIG_CALGARY_IOMMU=y # CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT is not set CONFIG_IOMMU_HELPER=y CONFIG_SWIOTLB=y CONFIG_NR_CPUS=8 CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=y # CONFIG_PREEMPT_RCU is not set CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_MCE=y CONFIG_X86_MCE_INTEL=y CONFIG_X86_MCE_AMD=y # CONFIG_I8K is not set CONFIG_MICROCODE=m CONFIG_MICROCODE_OLD_INTERFACE=y CONFIG_X86_MSR=m CONFIG_X86_CPUID=m # CONFIG_NUMA is not set CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_FLATMEM_MANUAL is not set # CONFIG_DISCONTIGMEM_MANUAL is not set CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM=y CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPARSEMEM_VMEMMAP=y # CONFIG_MEMORY_HOTPLUG is not set CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_RESOURCES_64BIT=y CONFIG_ZONE_DMA_FLAG=1 CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y CONFIG_MTRR=y # CONFIG_EFI is not set # CONFIG_SECCOMP is not set # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set CONFIG_HZ_1000=y CONFIG_HZ=1000 CONFIG_SCHED_HRTICK=y # CONFIG_KEXEC is not set # CONFIG_CRASH_DUMP is not set CONFIG_PHYSICAL_START=0x200000 # CONFIG_RELOCATABLE is not set CONFIG_PHYSICAL_ALIGN=0x200000 CONFIG_HOTPLUG_CPU=y CONFIG_COMPAT_VDSO=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # # Power management options # CONFIG_PM=y CONFIG_PM_LEGACY=y # CONFIG_PM_DEBUG is not set # CONFIG_SUSPEND is not set # CONFIG_HIBERNATION is not set CONFIG_ACPI=y CONFIG_ACPI_PROCFS=y CONFIG_ACPI_PROCFS_POWER=y CONFIG_ACPI_SYSFS_POWER=y CONFIG_ACPI_PROC_EVENT=y CONFIG_ACPI_AC=y CONFIG_ACPI_BATTERY=y CONFIG_ACPI_BUTTON=y CONFIG_ACPI_FAN=y # CONFIG_ACPI_DOCK is not set CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_THERMAL=y # CONFIG_ACPI_WMI is not set # CONFIG_ACPI_ASUS is not set # CONFIG_ACPI_TOSHIBA is not set CONFIG_ACPI_CUSTOM_DSDT_FILE="" # CONFIG_ACPI_CUSTOM_DSDT is not set CONFIG_ACPI_BLACKLIST_YEAR=0 # CONFIG_ACPI_DEBUG is not set CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_X86_PM_TIMER=y CONFIG_ACPI_CONTAINER=y # CONFIG_ACPI_SBS is not set # # CPU Frequency scaling # # CONFIG_CPU_FREQ is not set CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y # # Bus options (PCI etc.) # CONFIG_PCI=y CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y CONFIG_PCI_DOMAINS=y # CONFIG_PCIEPORTBUS is not set CONFIG_ARCH_SUPPORTS_MSI=y # CONFIG_PCI_MSI is not set CONFIG_PCI_LEGACY=y # CONFIG_PCI_DEBUG is not set CONFIG_HT_IRQ=y CONFIG_ISA_DMA_API=y CONFIG_K8_NB=y # CONFIG_PCCARD is not set # CONFIG_HOTPLUG_PCI is not set # # Executable file formats / Emulations # CONFIG_BINFMT_ELF=y CONFIG_COMPAT_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set CONFIG_IA32_EMULATION=y # CONFIG_IA32_AOUT is not set CONFIG_COMPAT=y CONFIG_COMPAT_FOR_U64_ALIGNMENT=y CONFIG_SYSVIPC_COMPAT=y # # Networking # CONFIG_NET=y # # Networking options # CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y CONFIG_XFRM=y CONFIG_XFRM_USER=y CONFIG_XFRM_SUB_POLICY=y # CONFIG_XFRM_MIGRATE is not set # CONFIG_XFRM_STATISTICS is not set CONFIG_NET_KEY=y # CONFIG_NET_KEY_MIGRATE is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y CONFIG_IP_ADVANCED_ROUTER=y CONFIG_ASK_IP_FIB_HASH=y # CONFIG_IP_FIB_TRIE is not set CONFIG_IP_FIB_HASH=y CONFIG_IP_MULTIPLE_TABLES=y CONFIG_IP_ROUTE_MULTIPATH=y CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_PNP is not set CONFIG_NET_IPIP=m CONFIG_NET_IPGRE=m CONFIG_NET_IPGRE_BROADCAST=y # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set CONFIG_SYN_COOKIES=y CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m CONFIG_INET_XFRM_TUNNEL=m CONFIG_INET_TUNNEL=m CONFIG_INET_XFRM_MODE_TRANSPORT=m CONFIG_INET_XFRM_MODE_TUNNEL=m CONFIG_INET_XFRM_MODE_BEET=m # CONFIG_INET_LRO is not set CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m CONFIG_TCP_CONG_ADVANCED=y CONFIG_TCP_CONG_BIC=y CONFIG_TCP_CONG_CUBIC=m CONFIG_TCP_CONG_WESTWOOD=m CONFIG_TCP_CONG_HTCP=m # CONFIG_TCP_CONG_HSTCP is not set # CONFIG_TCP_CONG_HYBLA is not set # CONFIG_TCP_CONG_VEGAS is not set # CONFIG_TCP_CONG_SCALABLE is not set # CONFIG_TCP_CONG_LP is not set # CONFIG_TCP_CONG_VENO is not set # CONFIG_TCP_CONG_YEAH is not set # CONFIG_TCP_CONG_ILLINOIS is not set CONFIG_DEFAULT_BIC=y # CONFIG_DEFAULT_CUBIC is not set # CONFIG_DEFAULT_HTCP is not set # CONFIG_DEFAULT_VEGAS is not set # CONFIG_DEFAULT_WESTWOOD is not set # CONFIG_DEFAULT_RENO is not set CONFIG_DEFAULT_TCP_CONG="bic" # CONFIG_TCP_MD5SIG is not set # CONFIG_IP_VS is not set CONFIG_IPV6=y CONFIG_IPV6_PRIVACY=y CONFIG_IPV6_ROUTER_PREF=y CONFIG_IPV6_ROUTE_INFO=y # CONFIG_IPV6_OPTIMISTIC_DAD is not set CONFIG_INET6_AH=y CONFIG_INET6_ESP=y CONFIG_INET6_IPCOMP=m # CONFIG_IPV6_MIP6 is not set CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m CONFIG_INET6_XFRM_MODE_TRANSPORT=m CONFIG_INET6_XFRM_MODE_TUNNEL=m CONFIG_INET6_XFRM_MODE_BEET=y # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set CONFIG_IPV6_SIT=m CONFIG_IPV6_TUNNEL=m # CONFIG_IPV6_MULTIPLE_TABLES is not set # CONFIG_NETWORK_SECMARK is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set CONFIG_NETFILTER_ADVANCED=y # # Core Netfilter Configuration # # CONFIG_NETFILTER_NETLINK_QUEUE is not set # CONFIG_NETFILTER_NETLINK_LOG is not set # CONFIG_NF_CONNTRACK is not set # CONFIG_NETFILTER_XTABLES is not set # # IP: Netfilter Configuration # # CONFIG_IP_NF_QUEUE is not set # CONFIG_IP_NF_IPTABLES is not set # CONFIG_IP_NF_ARPTABLES is not set # # IPv6: Netfilter Configuration # # CONFIG_IP6_NF_QUEUE is not set # CONFIG_IP6_NF_IPTABLES is not set # CONFIG_IP_DCCP is not set # CONFIG_IP_SCTP is not set # CONFIG_TIPC is not set # CONFIG_ATM is not set # CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set # CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_SCHED is not set # # Network testing # # CONFIG_NET_PKTGEN is not set # CONFIG_HAMRADIO is not set # CONFIG_CAN is not set # CONFIG_IRDA is not set # CONFIG_BT is not set # CONFIG_AF_RXRPC is not set CONFIG_FIB_RULES=y # # Wireless # # CONFIG_CFG80211 is not set # CONFIG_WIRELESS_EXT is not set # CONFIG_MAC80211 is not set # CONFIG_IEEE80211 is not set # CONFIG_RFKILL is not set # CONFIG_NET_9P is not set # # Device Drivers # # # Generic Driver Options # CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" # CONFIG_STANDALONE is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set CONFIG_FW_LOADER=m # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_SYS_HYPERVISOR is not set # CONFIG_CONNECTOR is not set # CONFIG_MTD is not set CONFIG_PARPORT=m CONFIG_PARPORT_PC=m # CONFIG_PARPORT_SERIAL is not set # CONFIG_PARPORT_PC_FIFO is not set # CONFIG_PARPORT_PC_SUPERIO is not set # CONFIG_PARPORT_GSC is not set # CONFIG_PARPORT_AX88796 is not set # CONFIG_PARPORT_1284 is not set CONFIG_PNP=y # CONFIG_PNP_DEBUG is not set # # Protocols # CONFIG_PNPACPI=y CONFIG_BLK_DEV=y CONFIG_BLK_DEV_FD=y CONFIG_PARIDE=m # # Parallel IDE high-level drivers # # CONFIG_PARIDE_PD is not set # CONFIG_PARIDE_PCD is not set # CONFIG_PARIDE_PF is not set # CONFIG_PARIDE_PT is not set # CONFIG_PARIDE_PG is not set # # Parallel IDE protocol modules # # CONFIG_PARIDE_ATEN is not set # CONFIG_PARIDE_BPCK is not set # CONFIG_PARIDE_COMM is not set # CONFIG_PARIDE_DSTR is not set # CONFIG_PARIDE_FIT2 is not set # CONFIG_PARIDE_FIT3 is not set # CONFIG_PARIDE_EPAT is not set # CONFIG_PARIDE_EPIA is not set # CONFIG_PARIDE_FRIQ is not set # CONFIG_PARIDE_FRPW is not set # CONFIG_PARIDE_KBIC is not set # CONFIG_PARIDE_KTTI is not set # CONFIG_PARIDE_ON20 is not set # CONFIG_PARIDE_ON26 is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_XIP=y CONFIG_CDROM_PKTCDVD=y CONFIG_CDROM_PKTCDVD_BUFFERS=8 # CONFIG_CDROM_PKTCDVD_WCACHE is not set # CONFIG_ATA_OVER_ETH is not set CONFIG_MISC_DEVICES=y # CONFIG_IBM_ASM is not set # CONFIG_PHANTOM is not set CONFIG_EEPROM_93CX6=m # CONFIG_SGI_IOC4 is not set # CONFIG_TIFM_CORE is not set # CONFIG_SONY_LAPTOP is not set # CONFIG_THINKPAD_ACPI is not set # CONFIG_INTEL_MENLOW is not set # CONFIG_ENCLOSURE_SERVICES is not set CONFIG_HAVE_IDE=y CONFIG_IDE=y CONFIG_IDE_MAX_HWIFS=4 CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide/ide.txt for help/info on IDE drives # # CONFIG_BLK_DEV_IDE_SATA is not set # CONFIG_BLK_DEV_HD_IDE is not set CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECD=y CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y CONFIG_BLK_DEV_IDETAPE=m CONFIG_BLK_DEV_IDEFLOPPY=m CONFIG_BLK_DEV_IDESCSI=m # CONFIG_BLK_DEV_IDEACPI is not set CONFIG_IDE_TASK_IOCTL=y CONFIG_IDE_PROC_FS=y # # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_PLATFORM is not set CONFIG_BLK_DEV_CMD640=y # CONFIG_BLK_DEV_CMD640_ENHANCED is not set CONFIG_BLK_DEV_IDEPNP=y # # PCI IDE chipsets support # # CONFIG_BLK_DEV_GENERIC is not set # CONFIG_BLK_DEV_OPTI621 is not set # CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set # CONFIG_BLK_DEV_AMD74XX is not set # CONFIG_BLK_DEV_ATIIXP is not set # CONFIG_BLK_DEV_CMD64X is not set # CONFIG_BLK_DEV_TRIFLEX is not set # CONFIG_BLK_DEV_CY82C693 is not set # CONFIG_BLK_DEV_CS5520 is not set # CONFIG_BLK_DEV_CS5530 is not set # CONFIG_BLK_DEV_HPT34X is not set # CONFIG_BLK_DEV_HPT366 is not set # CONFIG_BLK_DEV_JMICRON is not set # CONFIG_BLK_DEV_SC1200 is not set # CONFIG_BLK_DEV_PIIX is not set # CONFIG_BLK_DEV_IT8213 is not set # CONFIG_BLK_DEV_IT821X is not set # CONFIG_BLK_DEV_NS87415 is not set # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set # CONFIG_BLK_DEV_SVWKS is not set # CONFIG_BLK_DEV_SIIMAGE is not set # CONFIG_BLK_DEV_SIS5513 is not set # CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set # CONFIG_BLK_DEV_VIA82CXXX is not set # CONFIG_BLK_DEV_TC86C001 is not set # CONFIG_BLK_DEV_IDEDMA is not set CONFIG_IDE_ARCH_OBSOLETE_INIT=y # CONFIG_BLK_DEV_HD is not set # # SCSI device support # # CONFIG_RAID_ATTRS is not set CONFIG_SCSI=y CONFIG_SCSI_DMA=y CONFIG_SCSI_TGT=m # CONFIG_SCSI_NETLINK is not set CONFIG_SCSI_PROC_FS=y # # SCSI support type (disk, tape, CD-ROM) # CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_ST=m CONFIG_CHR_DEV_OSST=m CONFIG_BLK_DEV_SR=m CONFIG_BLK_DEV_SR_VENDOR=y CONFIG_CHR_DEV_SG=m # CONFIG_CHR_DEV_SCH is not set # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # CONFIG_SCSI_MULTI_LUN=y # CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_LOGGING is not set # CONFIG_SCSI_SCAN_ASYNC is not set CONFIG_SCSI_WAIT_SCAN=m # # SCSI Transports # CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_ISCSI_ATTRS is not set CONFIG_SCSI_SAS_ATTRS=m CONFIG_SCSI_SAS_LIBSAS=m CONFIG_SCSI_SAS_ATA=y CONFIG_SCSI_SAS_HOST_SMP=y # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set # CONFIG_SCSI_SRP_ATTRS is not set CONFIG_SCSI_LOWLEVEL=y # CONFIG_ISCSI_TCP is not set # CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set CONFIG_SCSI_AIC7XXX=y CONFIG_AIC7XXX_CMDS_PER_DEVICE=8 CONFIG_AIC7XXX_RESET_DELAY_MS=15000 CONFIG_AIC7XXX_BUILD_FIRMWARE=y CONFIG_AIC7XXX_DEBUG_ENABLE=y CONFIG_AIC7XXX_DEBUG_MASK=0 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y # CONFIG_SCSI_AIC7XXX_OLD is not set CONFIG_SCSI_AIC79XX=y CONFIG_AIC79XX_CMDS_PER_DEVICE=8 CONFIG_AIC79XX_RESET_DELAY_MS=15000 CONFIG_AIC79XX_BUILD_FIRMWARE=y CONFIG_AIC79XX_DEBUG_ENABLE=y CONFIG_AIC79XX_DEBUG_MASK=0 CONFIG_AIC79XX_REG_PRETTY_PRINT=y CONFIG_SCSI_AIC94XX=m CONFIG_AIC94XX_DEBUG=y # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_ARCMSR is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set # CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_PPA is not set # CONFIG_SCSI_IMM is not set # CONFIG_SCSI_MVSAS is not set # CONFIG_SCSI_STEX is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_QLA_ISCSI is not set # CONFIG_SCSI_LPFC is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_SRP is not set CONFIG_ATA=y # CONFIG_ATA_NONSTANDARD is not set CONFIG_ATA_ACPI=y CONFIG_SATA_AHCI=y # CONFIG_SATA_SVW is not set CONFIG_ATA_PIIX=y CONFIG_SATA_MV=y CONFIG_SATA_NV=y # CONFIG_PDC_ADMA is not set # CONFIG_SATA_QSTOR is not set CONFIG_SATA_PROMISE=y CONFIG_SATA_SX4=y CONFIG_SATA_SIL=y CONFIG_SATA_SIL24=y CONFIG_SATA_SIS=y CONFIG_SATA_ULI=y CONFIG_SATA_VIA=y CONFIG_SATA_VITESSE=y # CONFIG_SATA_INIC162X is not set # CONFIG_PATA_ACPI is not set # CONFIG_PATA_ALI is not set # CONFIG_PATA_AMD is not set # CONFIG_PATA_ARTOP is not set # CONFIG_PATA_ATIIXP is not set # CONFIG_PATA_CMD640_PCI is not set # CONFIG_PATA_CMD64X is not set # CONFIG_PATA_CS5520 is not set # CONFIG_PATA_CS5530 is not set # CONFIG_PATA_CYPRESS is not set # CONFIG_PATA_EFAR is not set # CONFIG_ATA_GENERIC is not set # CONFIG_PATA_HPT366 is not set # CONFIG_PATA_HPT37X is not set # CONFIG_PATA_HPT3X2N is not set # CONFIG_PATA_HPT3X3 is not set # CONFIG_PATA_IT821X is not set # CONFIG_PATA_IT8213 is not set # CONFIG_PATA_JMICRON is not set # CONFIG_PATA_TRIFLEX is not set # CONFIG_PATA_MARVELL is not set # CONFIG_PATA_MPIIX is not set # CONFIG_PATA_OLDPIIX is not set # CONFIG_PATA_NETCELL is not set # CONFIG_PATA_NINJA32 is not set # CONFIG_PATA_NS87410 is not set # CONFIG_PATA_NS87415 is not set # CONFIG_PATA_OPTI is not set # CONFIG_PATA_OPTIDMA is not set # CONFIG_PATA_PDC_OLD is not set # CONFIG_PATA_RADISYS is not set # CONFIG_PATA_RZ1000 is not set # CONFIG_PATA_SC1200 is not set # CONFIG_PATA_SERVERWORKS is not set # CONFIG_PATA_PDC2027X is not set # CONFIG_PATA_SIL680 is not set CONFIG_PATA_SIS=y # CONFIG_PATA_VIA is not set # CONFIG_PATA_WINBOND is not set # CONFIG_PATA_PLATFORM is not set CONFIG_MD=y CONFIG_BLK_DEV_MD=m CONFIG_MD_LINEAR=m CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID10=m CONFIG_MD_RAID456=m CONFIG_MD_RAID5_RESHAPE=y CONFIG_MD_MULTIPATH=m CONFIG_MD_FAULTY=m CONFIG_BLK_DEV_DM=m CONFIG_DM_DEBUG=y CONFIG_DM_CRYPT=m # CONFIG_DM_SNAPSHOT is not set # CONFIG_DM_MIRROR is not set # CONFIG_DM_ZERO is not set # CONFIG_DM_MULTIPATH is not set # CONFIG_DM_DELAY is not set # CONFIG_DM_UEVENT is not set # CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support # # CONFIG_FIREWIRE is not set # CONFIG_IEEE1394 is not set # CONFIG_I2O is not set # CONFIG_MACINTOSH_DRIVERS is not set CONFIG_NETDEVICES=y # CONFIG_NETDEVICES_MULTIQUEUE is not set CONFIG_DUMMY=m CONFIG_BONDING=m # CONFIG_MACVLAN is not set CONFIG_EQUALIZER=m CONFIG_TUN=m # CONFIG_VETH is not set # CONFIG_NET_SB1000 is not set # CONFIG_ARCNET is not set # CONFIG_PHYLIB is not set CONFIG_NET_ETHERNET=y CONFIG_MII=y CONFIG_HAPPYMEAL=y CONFIG_SUNGEM=y # CONFIG_CASSINI is not set CONFIG_NET_VENDOR_3COM=y CONFIG_VORTEX=y CONFIG_TYPHOON=y # CONFIG_NET_TULIP is not set CONFIG_HP100=y # CONFIG_IBM_NEW_EMAC_ZMII is not set # CONFIG_IBM_NEW_EMAC_RGMII is not set # CONFIG_IBM_NEW_EMAC_TAH is not set # CONFIG_IBM_NEW_EMAC_EMAC4 is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set # CONFIG_FORCEDETH is not set # CONFIG_EEPRO100 is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set # CONFIG_8139CP is not set # CONFIG_8139TOO is not set # CONFIG_R6040 is not set # CONFIG_SIS900 is not set # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_VIA_RHINE is not set # CONFIG_SC92031 is not set # CONFIG_NET_POCKET is not set CONFIG_NETDEV_1000=y # CONFIG_ACENIC is not set # CONFIG_DL2K is not set # CONFIG_E1000 is not set # CONFIG_E1000E is not set # CONFIG_E1000E_ENABLED is not set # CONFIG_IP1000 is not set # CONFIG_IGB is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SIS190 is not set # CONFIG_SKGE is not set # CONFIG_SKY2 is not set # CONFIG_SK98LIN is not set # CONFIG_VIA_VELOCITY is not set # CONFIG_TIGON3 is not set # CONFIG_BNX2 is not set # CONFIG_QLA3XXX is not set # CONFIG_ATL1 is not set CONFIG_NETDEV_10000=y # CONFIG_CHELSIO_T1 is not set # CONFIG_CHELSIO_T3 is not set # CONFIG_IXGBE is not set # CONFIG_IXGB is not set # CONFIG_S2IO is not set # CONFIG_MYRI10GE is not set # CONFIG_NETXEN_NIC is not set # CONFIG_NIU is not set # CONFIG_MLX4_CORE is not set # CONFIG_TEHUTI is not set # CONFIG_BNX2X is not set # CONFIG_TR is not set # # Wireless LAN # # CONFIG_WLAN_PRE80211 is not set # CONFIG_WLAN_80211 is not set # # USB Network Adapters # # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set # CONFIG_USB_PEGASUS is not set # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set # CONFIG_WAN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set # CONFIG_PLIP is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set # CONFIG_NET_FC is not set # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set # CONFIG_ISDN is not set # CONFIG_PHONE is not set # # Input device support # CONFIG_INPUT=y # CONFIG_INPUT_FF_MEMLESS is not set CONFIG_INPUT_POLLDEV=m # # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set CONFIG_INPUT_EVDEV=m # CONFIG_INPUT_EVBUG is not set # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_STOWAWAY is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y CONFIG_MOUSE_PS2_ALPS=y CONFIG_MOUSE_PS2_LOGIPS2PP=y CONFIG_MOUSE_PS2_SYNAPTICS=y CONFIG_MOUSE_PS2_LIFEBOOK=y CONFIG_MOUSE_PS2_TRACKPOINT=y CONFIG_MOUSE_PS2_TOUCHKIT=y CONFIG_MOUSE_SERIAL=y CONFIG_MOUSE_APPLETOUCH=y # CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # # Hardware I/O ports # CONFIG_SERIO=y CONFIG_SERIO_I8042=y CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PARKBD is not set CONFIG_SERIO_PCIPS2=y CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set CONFIG_GAMEPORT=y CONFIG_GAMEPORT_NS558=y # CONFIG_GAMEPORT_L4 is not set # CONFIG_GAMEPORT_EMU10K1 is not set # CONFIG_GAMEPORT_FM801 is not set # # Character devices # CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y # CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_NOZOMI is not set # # Serial drivers # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_PNP=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_MANY_PORTS=y CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_DETECT_IRQ=y # CONFIG_SERIAL_8250_RSA is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_PRINTER is not set # CONFIG_PPDEV is not set # CONFIG_IPMI_HANDLER is not set CONFIG_HW_RANDOM=m CONFIG_HW_RANDOM_INTEL=m CONFIG_HW_RANDOM_AMD=m # CONFIG_NVRAM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set # CONFIG_MWAVE is not set # CONFIG_PC8736x_GPIO is not set # CONFIG_RAW_DRIVER is not set # CONFIG_HPET is not set # CONFIG_HANGCHECK_TIMER is not set # CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set CONFIG_DEVPORT=y # CONFIG_I2C is not set # # SPI support # # CONFIG_SPI is not set # CONFIG_SPI_MASTER is not set # CONFIG_W1 is not set CONFIG_POWER_SUPPLY=y # CONFIG_POWER_SUPPLY_DEBUG is not set # CONFIG_PDA_POWER is not set # CONFIG_BATTERY_DS2760 is not set CONFIG_HWMON=y # CONFIG_HWMON_VID is not set # CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_ABITUGURU3 is not set # CONFIG_SENSORS_K8TEMP is not set # CONFIG_SENSORS_I5K_AMB is not set # CONFIG_SENSORS_F71805F is not set # CONFIG_SENSORS_F71882FG is not set # CONFIG_SENSORS_CORETEMP is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_PC87427 is not set # CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT1211 is not set # CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set # CONFIG_SENSORS_HDAPS is not set # CONFIG_SENSORS_APPLESMC is not set # CONFIG_HWMON_DEBUG_CHIP is not set CONFIG_THERMAL=y # CONFIG_WATCHDOG is not set # # Sonics Silicon Backplane # CONFIG_SSB_POSSIBLE=y # CONFIG_SSB is not set # # Multifunction device drivers # # CONFIG_MFD_SM501 is not set # # Multimedia devices # # CONFIG_VIDEO_DEV is not set # CONFIG_DVB_CORE is not set # CONFIG_DAB is not set # # Graphics support # CONFIG_AGP=y CONFIG_AGP_AMD64=y # CONFIG_AGP_INTEL is not set # CONFIG_AGP_SIS is not set # CONFIG_AGP_VIA is not set # CONFIG_DRM is not set # CONFIG_VGASTATE is not set # CONFIG_VIDEO_OUTPUT_CONTROL is not set # CONFIG_FB is not set # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Display device support # # CONFIG_DISPLAY_SUPPORT is not set # # Console display driver support # CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 CONFIG_VIDEO_SELECT=y CONFIG_DUMMY_CONSOLE=y # # Sound # # CONFIG_SOUND is not set CONFIG_HID_SUPPORT=y CONFIG_HID=y # CONFIG_HID_DEBUG is not set # CONFIG_HIDRAW is not set # # USB Input Devices # CONFIG_USB_HID=y # CONFIG_USB_HIDINPUT_POWERBOOK is not set # CONFIG_HID_FF is not set # CONFIG_USB_HIDDEV is not set CONFIG_USB_SUPPORT=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB=y # CONFIG_USB_DEBUG is not set # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set # # Miscellaneous USB options # # CONFIG_USB_DEVICEFS is not set CONFIG_USB_DEVICE_CLASS=y # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_SUSPEND is not set # CONFIG_USB_PERSIST is not set # CONFIG_USB_OTG is not set # # USB Host Controller Drivers # # CONFIG_USB_EHCI_HCD is not set # CONFIG_USB_ISP116X_HCD is not set # CONFIG_USB_OHCI_HCD is not set # CONFIG_USB_UHCI_HCD is not set # CONFIG_USB_SL811_HCD is not set # CONFIG_USB_R8A66597_HCD is not set # # USB Device Class drivers # # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # # # may also be needed; see USB_STORAGE Help for more information # # CONFIG_USB_STORAGE is not set # CONFIG_USB_LIBUSUAL is not set # # USB Imaging devices # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set CONFIG_USB_MON=y # # USB port drivers # # CONFIG_USB_USS720 is not set # CONFIG_USB_SERIAL is not set # # USB Miscellaneous drivers # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set # CONFIG_USB_ADUTUX is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_BERRY_CHARGE is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYPRESS_CY7C63 is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGET is not set # CONFIG_USB_IDMOUSE is not set # CONFIG_USB_FTDI_ELAN is not set # CONFIG_USB_APPLEDISPLAY is not set # CONFIG_USB_LD is not set # CONFIG_USB_TRANCEVIBRATOR is not set # CONFIG_USB_IOWARRIOR is not set # CONFIG_USB_GADGET is not set # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set # CONFIG_NEW_LEDS is not set # CONFIG_INFINIBAND is not set # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y # CONFIG_RTC_HCTOSYS is not set # CONFIG_RTC_DEBUG is not set # # RTC interfaces # # CONFIG_RTC_INTF_SYSFS is not set # CONFIG_RTC_INTF_PROC is not set # CONFIG_RTC_INTF_DEV is not set # CONFIG_RTC_DRV_TEST is not set # # SPI RTC drivers # # # Platform RTC drivers # # CONFIG_RTC_DRV_CMOS is not set # CONFIG_RTC_DRV_DS1511 is not set # CONFIG_RTC_DRV_DS1553 is not set # CONFIG_RTC_DRV_DS1742 is not set # CONFIG_RTC_DRV_STK17TA8 is not set # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_M48T59 is not set # CONFIG_RTC_DRV_V3020 is not set # # on-CPU RTC drivers # # CONFIG_DMADEVICES is not set # CONFIG_AUXDISPLAY is not set # # Userspace I/O # # CONFIG_UIO is not set # # Firmware Drivers # # CONFIG_EDD is not set # CONFIG_DELL_RBU is not set # CONFIG_DCDBAS is not set CONFIG_DMIID=y # # File systems # # CONFIG_EXT2_FS is not set # CONFIG_EXT3_FS is not set # CONFIG_EXT4DEV_FS is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y # CONFIG_XFS_FS is not set # CONFIG_GFS2_FS is not set # CONFIG_OCFS2_FS is not set # CONFIG_DNOTIFY is not set # CONFIG_INOTIFY is not set # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set CONFIG_GENERIC_ACL=y # # CD-ROM/DVD Filesystems # # CONFIG_ISO9660_FS is not set # CONFIG_UDF_FS is not set # # DOS/FAT/NT Filesystems # # CONFIG_MSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_PROC_SYSCTL=y CONFIG_SYSFS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_CONFIGFS_FS=m # # Miscellaneous filesystems # # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set # CONFIG_NETWORK_FILESYSTEMS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y # CONFIG_NLS is not set # CONFIG_DLM is not set # # Kernel hacking # CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_MAGIC_SYSRQ=y CONFIG_UNUSED_SYMBOLS=y CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_SHIRQ is not set CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHED_DEBUG is not set CONFIG_SCHEDSTATS=y # CONFIG_TIMER_STATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_PREEMPT is not set # CONFIG_DEBUG_RT_MUTEXES is not set # CONFIG_RT_MUTEX_TESTER is not set # CONFIG_DEBUG_SPINLOCK is not set CONFIG_DEBUG_MUTEXES=y # CONFIG_DEBUG_LOCK_ALLOC is not set # CONFIG_PROVE_LOCKING is not set # CONFIG_LOCK_STAT is not set CONFIG_DEBUG_SPINLOCK_SLEEP=y # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set # CONFIG_DEBUG_SG is not set # CONFIG_FRAME_POINTER is not set # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_FAULT_INJECTION is not set # CONFIG_LATENCYTOP is not set # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set # CONFIG_SAMPLES is not set CONFIG_EARLY_PRINTK=y # CONFIG_DEBUG_STACKOVERFLOW is not set # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_DEBUG_PER_CPU_MAPS is not set # CONFIG_DEBUG_RODATA is not set # CONFIG_DEBUG_NX_TEST is not set CONFIG_X86_MPPARSE=y # CONFIG_IOMMU_DEBUG is not set CONFIG_IO_DELAY_TYPE_0X80=0 CONFIG_IO_DELAY_TYPE_0XED=1 CONFIG_IO_DELAY_TYPE_UDELAY=2 CONFIG_IO_DELAY_TYPE_NONE=3 CONFIG_IO_DELAY_0X80=y # CONFIG_IO_DELAY_0XED is not set # CONFIG_IO_DELAY_UDELAY is not set # CONFIG_IO_DELAY_NONE is not set CONFIG_DEFAULT_IO_DELAY_TYPE=0 # CONFIG_DEBUG_BOOT_PARAMS is not set # CONFIG_CPA_DEBUG is not set # # Security options # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set # CONFIG_SECURITY_FILE_CAPABILITIES is not set CONFIG_XOR_BLOCKS=m CONFIG_ASYNC_CORE=m CONFIG_ASYNC_MEMCPY=m CONFIG_ASYNC_XOR=m CONFIG_CRYPTO=y CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_BLKCIPHER=y # CONFIG_CRYPTO_SEQIV is not set CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_HMAC=y # CONFIG_CRYPTO_XCBC is not set # CONFIG_CRYPTO_NULL is not set # CONFIG_CRYPTO_MD4 is not set CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set # CONFIG_CRYPTO_WP512 is not set # CONFIG_CRYPTO_TGR192 is not set # CONFIG_CRYPTO_GF128MUL is not set CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_CBC=y # CONFIG_CRYPTO_PCBC is not set # CONFIG_CRYPTO_LRW is not set # CONFIG_CRYPTO_XTS is not set # CONFIG_CRYPTO_CTR is not set # CONFIG_CRYPTO_GCM is not set # CONFIG_CRYPTO_CCM is not set # CONFIG_CRYPTO_CRYPTD is not set CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_FCRYPT is not set # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set # CONFIG_CRYPTO_TWOFISH_X86_64 is not set # CONFIG_CRYPTO_SERPENT is not set CONFIG_CRYPTO_AES=m # CONFIG_CRYPTO_AES_X86_64 is not set # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_TEA is not set CONFIG_CRYPTO_ARC4=m # CONFIG_CRYPTO_KHAZAD is not set # CONFIG_CRYPTO_ANUBIS is not set # CONFIG_CRYPTO_SEED is not set # CONFIG_CRYPTO_SALSA20 is not set # CONFIG_CRYPTO_SALSA20_X86_64 is not set CONFIG_CRYPTO_DEFLATE=m CONFIG_CRYPTO_MICHAEL_MIC=m # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_CAMELLIA is not set # CONFIG_CRYPTO_TEST is not set CONFIG_CRYPTO_AUTHENC=y # CONFIG_CRYPTO_LZO is not set # CONFIG_CRYPTO_HW is not set CONFIG_HAVE_KVM=y # CONFIG_VIRTUALIZATION is not set # # Library routines # CONFIG_BITREVERSE=y CONFIG_CRC_CCITT=y CONFIG_CRC16=y CONFIG_CRC_ITU_T=y CONFIG_CRC32=y # CONFIG_CRC7 is not set CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=m CONFIG_ZLIB_DEFLATE=m CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2008-04-07 18:00 ` Denys Vlasenko @ 2008-04-08 12:23 ` Hannes Reinecke 2008-04-08 14:08 ` Denys Vlasenko 0 siblings, 1 reply; 24+ messages in thread From: Hannes Reinecke @ 2008-04-08 12:23 UTC (permalink / raw) To: Denys Vlasenko; +Cc: Andrew Morton, linux-scsi Hi Denys, Denys Vlasenko wrote: > On Monday 07 April 2008 12:34, Hannes Reinecke wrote: >>> Adds statics, #ifdefs out huge amount of unused code, adds consts >>> >>> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> >>> -- >>> vda >>> >> NACK. We need the #defines to print out the registers. >> And in either case the *_shipped files are in fact >> autogenerated by aic assembler, so we need to fix that >> one, too. > > I assume you are talking about this part of a patch: > > --- linux-2.6.25-rc6-aic1/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped 2008-03-23 00:43:20.000000000 +0100 > +++ linux-2.6.25-rc6-aic2/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped 2008-03-23 00:54:59.000000000 +0100 > @@ -11,23 +11,18 @@ typedef struct ahd_reg_parse_entry { > uint8_t value; > uint8_t mask; > } ahd_reg_parse_entry_t; > > +#if 0 /* unused */ > + > #if AIC_DEBUG_REGISTERS > ahd_reg_print_t ahd_mode_ptr_print; > #else > #define ahd_mode_ptr_print(regvalue, cur_col, wrap) \ > ahd_print_register(NULL, 0, "MODE_PTR", 0x00, regvalue, cur_col, wrap) > #endif > > ..... > ..... > Correct. > > Let me explain what I am doing here. I am NOT deleting ahd_intstat_print > definition, I am moving it below the #endif which terminates big > #if 0 /* unused */ block, moving to this place: > > > @@ -2377,8 +2043,346 @@ ahd_reg_print_t ahd_scb_disconnected_lis > #define ahd_scb_disconnected_lists_print(regvalue, cur_col, wrap) \ > ahd_print_register(NULL, 0, "SCB_DISCONNECTED_LISTS", 0x1b8, regvalue, cur_col, wrap) > #endif > > +#endif /* unused */ > + > +#if AIC_DEBUG_REGISTERS > +ahd_reg_print_t ahd_intstat_print; > +#else > +#define ahd_intstat_print(regvalue, cur_col, wrap) \ > + ahd_print_register(NULL, 0, "INTSTAT", 0x01, regvalue, cur_col, wrap) > +#endif > ... > ... > Hmm. > > #if 0 / #endif block ends up containing definitions of 290 functions/macros, > none of which is EVER used. I used this script (below) and verified that > they are never mentioned anywhere outside of *_shipped files. > I also did test builds with and without debug enabled and they build > with no problems. No undefined references! > Well, still not quite. The point here is that all of the functions in the *_shipped files are in fact auto-generated by aicasm, based on the definitions in aic79xx.seq and aic79xx.reg. So the *_reg_print.c files contains functions for all _defined_ registers, not the actually used ones. What we have to do here is to modify aicasm to not print out the unused definitions, and copy those (autogenerated) files over to the *_shipped files to have them synced properly. Hand-patching the *_shipped files is not a good idea. The const idea is a good one, and actually a one-liner to fix: diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c index f1f448d..a7a51e4 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c @@ -370,7 +370,7 @@ aic_print_reg_dump_start(FILE *dfile, symbol_node_t *regnode) return; fprintf(dfile, -"static %sreg_parse_entry_t %s_parse_table[] = {\n", +"static const %sreg_parse_entry_t %s_parse_table[] = {\n", prefix, regnode->symbol->name); } Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2008-04-08 12:23 ` Hannes Reinecke @ 2008-04-08 14:08 ` Denys Vlasenko 2008-04-08 14:54 ` Hannes Reinecke 2008-04-14 18:46 ` Denys Vlasenko 0 siblings, 2 replies; 24+ messages in thread From: Denys Vlasenko @ 2008-04-08 14:08 UTC (permalink / raw) To: Hannes Reinecke; +Cc: Andrew Morton, linux-scsi On Tuesday 08 April 2008 14:23, Hannes Reinecke wrote: > > I assume you are talking about this part of a patch: > > > > --- linux-2.6.25-rc6-aic1/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped 2008-03-23 00:43:20.000000000 +0100 > > +++ linux-2.6.25-rc6-aic2/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped 2008-03-23 00:54:59.000000000 +0100 > > @@ -11,23 +11,18 @@ typedef struct ahd_reg_parse_entry { > > uint8_t value; > > uint8_t mask; > > } ahd_reg_parse_entry_t; > > > > +#if 0 /* unused */ > > + > > #if AIC_DEBUG_REGISTERS > > ahd_reg_print_t ahd_mode_ptr_print; > > #else > > #define ahd_mode_ptr_print(regvalue, cur_col, wrap) \ > > ahd_print_register(NULL, 0, "MODE_PTR", 0x00, regvalue, cur_col, wrap) > > #endif > > > > ..... > > ..... > > > Correct. > > > > > Let me explain what I am doing here. I am NOT deleting ahd_intstat_print > > definition, I am moving it below the #endif which terminates big > > #if 0 /* unused */ block, moving to this place: > > > > > > @@ -2377,8 +2043,346 @@ ahd_reg_print_t ahd_scb_disconnected_lis > > #define ahd_scb_disconnected_lists_print(regvalue, cur_col, wrap) \ > > ahd_print_register(NULL, 0, "SCB_DISCONNECTED_LISTS", 0x1b8, regvalue, cur_col, wrap) > > #endif > > > > +#endif /* unused */ > > + > > +#if AIC_DEBUG_REGISTERS > > +ahd_reg_print_t ahd_intstat_print; > > +#else > > +#define ahd_intstat_print(regvalue, cur_col, wrap) \ > > + ahd_print_register(NULL, 0, "INTSTAT", 0x01, regvalue, cur_col, wrap) > > +#endif > > ... > > ... > > > Hmm. > > > > > #if 0 / #endif block ends up containing definitions of 290 functions/macros, > > none of which is EVER used. I used this script (below) and verified that > > they are never mentioned anywhere outside of *_shipped files. > > I also did test builds with and without debug enabled and they build > > with no problems. No undefined references! > > > Well, still not quite. The point here is that all of the functions in the > *_shipped files are in fact auto-generated by aicasm, based on the definitions > in aic79xx.seq and aic79xx.reg. So the *_reg_print.c files contains > functions for all _defined_ registers, not the actually used ones. > What we have to do here is to modify aicasm to not print out the > unused definitions, and copy those (autogenerated) files over to > the *_shipped files to have them synced properly. > Hand-patching the *_shipped files is not a good idea. I do understand this, and I do understnad then _shipped files are generated. But I failed to find out HOW they are generated. I don't want to _only_ patch aicasm/* files and skip checking that my changes work (or at least compile). Please let me know how to regenerate these _shipped files, and I will fix it "correctly" by modifying aicasm/* files. -- vda ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2008-04-08 14:08 ` Denys Vlasenko @ 2008-04-08 14:54 ` Hannes Reinecke 2008-04-08 15:08 ` Denys Vlasenko 2008-04-14 18:46 ` Denys Vlasenko 1 sibling, 1 reply; 24+ messages in thread From: Hannes Reinecke @ 2008-04-08 14:54 UTC (permalink / raw) To: Denys Vlasenko; +Cc: Andrew Morton, linux-scsi Hi Denys, Denys Vlasenko wrote: > On Tuesday 08 April 2008 14:23, Hannes Reinecke wrote: [ .. ] >> What we have to do here is to modify aicasm to not print out the >> unused definitions, and copy those (autogenerated) files over to >> the *_shipped files to have them synced properly. >> Hand-patching the *_shipped files is not a good idea. > > I do understand this, and I do understnad then _shipped files > are generated. But I failed to find out HOW they are generated. > I don't want to _only_ patch aicasm/* files and skip checking > that my changes work (or at least compile). > > Please let me know how to regenerate these _shipped files, > and I will fix it "correctly" by modifying aicasm/* files. CONFIG_PREVENT_FIRMWARE_BUILD is the trick. Once it's enable there's a config option which allows you to build the aic7xxx firmware files from scratch. But you need my patch I just posted to linux-scsi, otherwise aicasm will complain and not build anything. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2008-04-08 14:54 ` Hannes Reinecke @ 2008-04-08 15:08 ` Denys Vlasenko 2008-04-14 18:47 ` Denys Vlasenko 0 siblings, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2008-04-08 15:08 UTC (permalink / raw) To: Hannes Reinecke; +Cc: Andrew Morton, linux-scsi On Tuesday 08 April 2008 16:54, Hannes Reinecke wrote: > Hi Denys, > > Denys Vlasenko wrote: > > On Tuesday 08 April 2008 14:23, Hannes Reinecke wrote: > [ .. ] > >> What we have to do here is to modify aicasm to not print out the > >> unused definitions, and copy those (autogenerated) files over to > >> the *_shipped files to have them synced properly. > >> Hand-patching the *_shipped files is not a good idea. > > > > I do understand this, and I do understnad then _shipped files > > are generated. But I failed to find out HOW they are generated. > > I don't want to _only_ patch aicasm/* files and skip checking > > that my changes work (or at least compile). > > > > Please let me know how to regenerate these _shipped files, > > and I will fix it "correctly" by modifying aicasm/* files. > > CONFIG_PREVENT_FIRMWARE_BUILD is the trick. > Once it's enable there's a config option which allows you to > build the aic7xxx firmware files from scratch. Well, I already tried it, and I mentioned it in my previous email. Relevant part of make output: LD kernel/built-in.o make -C drivers/scsi/aic7xxx/aicasm bison -d -b aicasm_gram aicasm_gram.y aicasm_gram.y: warning: 1 useless nonterminal and 6 useless rules aicasm_gram.y:217.46-54: warning: useless nonterminal: f4_opcode aicasm_gram.y:1315.9-37: warning: useless rule: f4_opcode: T_OR16 aicasm_gram.y:1316.9-38: warning: useless rule: f4_opcode: T_AND16 aicasm_gram.y:1317.9-38: warning: useless rule: f4_opcode: T_XOR16 aicasm_gram.y:1318.9-38: warning: useless rule: f4_opcode: T_ADD16 aicasm_gram.y:1319.9-38: warning: useless rule: f4_opcode: T_ADC16 aicasm_gram.y:1320.9-38: warning: useless rule: f4_opcode: T_MVI16 mv aicasm_gram.tab.c aicasm_gram.c mv aicasm_gram.tab.h aicasm_gram.h bison -d -b aicasm_macro_gram -p mm aicasm_macro_gram.y mv aicasm_macro_gram.tab.c aicasm_macro_gram.c mv aicasm_macro_gram.tab.h aicasm_macro_gram.h flex -oaicasm_scan.c aicasm_scan.l flex -Pmm -oaicasm_macro_scan.c aicasm_macro_scan.l gcc -I/usr/include -I. aicasm.c aicasm_symbol.c aicasm_gram.c aicasm_macro_gram.c aicasm_scan.c aicasm_macro_scan.c -o aicasm -ldb drivers/scsi/aic7xxx/aicasm/aicasm -Idrivers/scsi/aic7xxx -r drivers/scsi/aic7xxx/aic79xx_reg.h \ -p drivers/scsi/aic7xxx/aic79xx_reg_print.c -i aic79xx_osm.h -o drivers/scsi/aic7xxx/aic79xx_seq.h \ drivers/scsi/aic7xxx/aic79xx.seq drivers/scsi/aic7xxx/aicasm/aicasm: 826 instructions used CC drivers/scsi/aic7xxx/aic79xx_core.o CC drivers/scsi/aic7xxx/aic79xx_pci.o CC drivers/scsi/aic7xxx/aic79xx_reg_print.o CC drivers/scsi/aic7xxx/aic79xx_osm.o CC drivers/scsi/aic7xxx/aic79xx_proc.o CC drivers/scsi/aic7xxx/aic79xx_osm_pci.o drivers/scsi/aic7xxx/aicasm/aicasm -Idrivers/scsi/aic7xxx -r drivers/scsi/aic7xxx/aic7xxx_reg.h \ -p drivers/scsi/aic7xxx/aic7xxx_reg_print.c -i aic7xxx_osm.h -o drivers/scsi/aic7xxx/aic7xxx_seq.h \ drivers/scsi/aic7xxx/aic7xxx.seq drivers/scsi/aic7xxx/aicasm/aicasm: 880 instructions used CC drivers/scsi/aic7xxx/aic7xxx_core.o > But you need my patch I just posted to linux-scsi, otherwise > aicasm will complain and not build anything. Indeed, I found out that _shipped files are not updated after above. Can you send this patch to me? I'm not subscribed to linux-scsi... -- vda ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2008-04-08 15:08 ` Denys Vlasenko @ 2008-04-14 18:47 ` Denys Vlasenko [not found] ` <4804BE68.4000704@suse.de> 0 siblings, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2008-04-14 18:47 UTC (permalink / raw) To: Hannes Reinecke; +Cc: Andrew Morton, linux-scsi On Tuesday 08 April 2008 17:08, Denys Vlasenko wrote: > > > Please let me know how to regenerate these _shipped files, > > > and I will fix it "correctly" by modifying aicasm/* files. > > > > CONFIG_PREVENT_FIRMWARE_BUILD is the trick. > > Once it's enable there's a config option which allows you to > > build the aic7xxx firmware files from scratch. > > Well, I already tried it, and I mentioned it in my previous email. > Relevant part of make output: > > LD kernel/built-in.o > make -C drivers/scsi/aic7xxx/aicasm > bison -d -b aicasm_gram aicasm_gram.y > aicasm_gram.y: warning: 1 useless nonterminal and 6 useless rules > aicasm_gram.y:217.46-54: warning: useless nonterminal: f4_opcode > aicasm_gram.y:1315.9-37: warning: useless rule: f4_opcode: T_OR16 > aicasm_gram.y:1316.9-38: warning: useless rule: f4_opcode: T_AND16 > aicasm_gram.y:1317.9-38: warning: useless rule: f4_opcode: T_XOR16 > aicasm_gram.y:1318.9-38: warning: useless rule: f4_opcode: T_ADD16 > aicasm_gram.y:1319.9-38: warning: useless rule: f4_opcode: T_ADC16 > aicasm_gram.y:1320.9-38: warning: useless rule: f4_opcode: T_MVI16 > mv aicasm_gram.tab.c aicasm_gram.c > mv aicasm_gram.tab.h aicasm_gram.h > bison -d -b aicasm_macro_gram -p mm aicasm_macro_gram.y > mv aicasm_macro_gram.tab.c aicasm_macro_gram.c > mv aicasm_macro_gram.tab.h aicasm_macro_gram.h > flex -oaicasm_scan.c aicasm_scan.l > flex -Pmm -oaicasm_macro_scan.c aicasm_macro_scan.l > gcc -I/usr/include -I. aicasm.c aicasm_symbol.c aicasm_gram.c aicasm_macro_gram.c aicasm_scan.c aicasm_macro_scan.c -o aicasm -ldb > drivers/scsi/aic7xxx/aicasm/aicasm -Idrivers/scsi/aic7xxx -r drivers/scsi/aic7xxx/aic79xx_reg.h \ > -p drivers/scsi/aic7xxx/aic79xx_reg_print.c -i aic79xx_osm.h -o drivers/scsi/aic7xxx/aic79xx_seq.h \ > drivers/scsi/aic7xxx/aic79xx.seq > drivers/scsi/aic7xxx/aicasm/aicasm: 826 instructions used > CC drivers/scsi/aic7xxx/aic79xx_core.o > CC drivers/scsi/aic7xxx/aic79xx_pci.o > CC drivers/scsi/aic7xxx/aic79xx_reg_print.o > CC drivers/scsi/aic7xxx/aic79xx_osm.o > CC drivers/scsi/aic7xxx/aic79xx_proc.o > CC drivers/scsi/aic7xxx/aic79xx_osm_pci.o > drivers/scsi/aic7xxx/aicasm/aicasm -Idrivers/scsi/aic7xxx -r drivers/scsi/aic7xxx/aic7xxx_reg.h \ > -p drivers/scsi/aic7xxx/aic7xxx_reg_print.c -i aic7xxx_osm.h -o drivers/scsi/aic7xxx/aic7xxx_seq.h \ > drivers/scsi/aic7xxx/aic7xxx.seq > drivers/scsi/aic7xxx/aicasm/aicasm: 880 instructions used > CC drivers/scsi/aic7xxx/aic7xxx_core.o > > > But you need my patch I just posted to linux-scsi, otherwise > > aicasm will complain and not build anything. > > Indeed, I found out that _shipped files are not updated > after above. > > Can you send this patch to me? I'm not subscribed to linux-scsi... Ping here as well. -- vda ^ permalink raw reply [flat|nested] 24+ messages in thread
[parent not found: <4804BE68.4000704@suse.de>]
* Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers [not found] ` <4804BE68.4000704@suse.de> @ 2008-04-15 20:10 ` Denys Vlasenko 2008-04-21 5:10 ` Denys Vlasenko 0 siblings, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2008-04-15 20:10 UTC (permalink / raw) To: Hannes Reinecke; +Cc: linux-scsi, Andrew Morton [-- Attachment #1: Type: text/plain, Size: 3469 bytes --] Hi Hannes, On Tuesday 15 April 2008 16:40, Hannes Reinecke wrote: > >>>> Please let me know how to regenerate these _shipped files, > >>>> and I will fix it "correctly" by modifying aicasm/* files. > >>> CONFIG_PREVENT_FIRMWARE_BUILD is the trick. > >>> Once it's enable there's a config option which allows you to > >>> build the aic7xxx firmware files from scratch. > >> Well, I already tried it, and I mentioned it in my previous email. > >> > >>> But you need my patch I just posted to linux-scsi, otherwise > >>> aicasm will complain and not build anything. > >> Indeed, I found out that _shipped files are not updated > >> after above. > >> > >> Can you send this patch to me? I'm not subscribed to linux-scsi... > > > > Ping here as well. > > Sorry, slipped off my to-do list. > Here it is. I'm afraid I will continue to bug you - it does not work. :(. I applied your patch and I still couldn't get it to compile. I thought that it may be caused by me using not the latest scsi-misc-2.6 git tree, so I downloaded the tree and retried. Alas, same result. I followed your instructions: > Anyway, you'll have to enable the firmware build for aic7xxx / aic79xx > and do a diff between the files used for compiling and the *_shipped > files. > Then fixup the assembler in aicasm/* to print out the files in the way > you'd like it. > Once you're done you copy the generated files over to the *_shipped > files and send the diff. See attached .config file with firmware build options enabled. Since I want *_shipped files regenerated, they, obviously, should not take part in the build, so I renamed tham all to *_shipped-OFF, intending later to rediff them against newly-generated files. Then I ran "make bzImage" (64-bit x86) and got this error: ... LD drivers/power/built-in.o CC drivers/scsi/scsi.o CC drivers/scsi/hosts.o CC drivers/scsi/scsi_ioctl.o CC drivers/scsi/constants.o CC drivers/scsi/scsicam.o CC drivers/scsi/scsi_error.o CC drivers/scsi/scsi_lib.o CC drivers/scsi/scsi_lib_dma.o CC drivers/scsi/scsi_scan.o CC drivers/scsi/scsi_sysfs.o CC drivers/scsi/scsi_devinfo.o CC drivers/scsi/scsi_sysctl.o CC drivers/scsi/scsi_proc.o CC drivers/scsi/scsi_tgt_lib.o CC drivers/scsi/scsi_tgt_if.o CC drivers/scsi/sd.o CC drivers/scsi/sr.o CC drivers/scsi/sr_ioctl.o CC drivers/scsi/sr_vendor.o LD drivers/scsi/scsi_mod.o LD drivers/scsi/scsi_tgt.o CC drivers/scsi/scsi_transport_spi.o CC drivers/scsi/scsi_transport_sas.o drivers/scsi/aic7xxx/aicasm/aicasm -Idrivers/scsi/aic7xxx -r drivers/scsi/aic7xxx/aic79xx_reg.h \ -p drivers/scsi/aic7xxx/aic79xx_reg_print.c -i aic79xx_osm.h -o drivers/scsi/aic7xxx/aic79xx_seq.h \ drivers/scsi/aic7xxx/aic79xx.seq drivers/scsi/aic7xxx/aicasm/aicasm: Stopped at file drivers/scsi/aic7xxx/aic79xx.seq, line 263 - Invalid bit(s) 0xffffff00 in immediate wr itten to ACCUM drivers/scsi/aic7xxx/aicasm/aicasm: Removing drivers/scsi/aic7xxx/aic79xx_seq.h due to error drivers/scsi/aic7xxx/aicasm/aicasm: Removing drivers/scsi/aic7xxx/aic79xx_reg.h due to error make[3]: *** [drivers/scsi/aic7xxx/aic79xx_seq.h] Error 65 make[2]: *** [drivers/scsi/aic7xxx] Error 2 make[1]: *** [drivers/scsi] Error 2 make: *** [drivers] Error 2 This was on today's unmodified scsi-misc-2.6 git tree. Please help. -- vda [-- Attachment #2: .config --] [-- Type: text/plain, Size: 20506 bytes --] # # Automatically generated make config: don't edit # Linux kernel version: 2.6.25-rc8 # Tue Apr 15 22:01:59 2008 # CONFIG_64BIT=y # CONFIG_X86_32 is not set CONFIG_X86_64=y CONFIG_X86=y # CONFIG_GENERIC_LOCKBREAK is not set CONFIG_GENERIC_TIME=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_FAST_CMPXCHG_LOCAL=y CONFIG_MMU=y CONFIG_ZONE_DMA=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_HWEIGHT=y # CONFIG_GENERIC_GPIO is not set CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set # CONFIG_ARCH_HAS_ILOG2_U32 is not set # CONFIG_ARCH_HAS_ILOG2_U64 is not set CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ZONE_DMA32=y CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_AUDIT_ARCH=y CONFIG_ARCH_SUPPORTS_AOUT=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_X86_SMP=y CONFIG_X86_64_SMP=y CONFIG_X86_TRAMPOLINE=y # CONFIG_KTIME_SCALAR is not set CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # General setup # CONFIG_EXPERIMENTAL=y CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 # CONFIG_CGROUPS is not set CONFIG_GROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y # CONFIG_RT_GROUP_SCHED is not set CONFIG_USER_SCHED=y # CONFIG_CGROUP_SCHED is not set # CONFIG_SYSFS_DEPRECATED_V2 is not set CONFIG_RELAY=y # CONFIG_NAMESPACES is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_EMBEDDED=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_EXTRA_PASS=y CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_COMPAT_BRK=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y # CONFIG_VM_EVENT_COUNTERS is not set CONFIG_SLAB=y # CONFIG_SLUB is not set # CONFIG_SLOB is not set # CONFIG_PROFILING is not set # CONFIG_MARKERS is not set CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y # CONFIG_PROC_PAGE_MONITOR is not set CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_MODULES is not set CONFIG_BLOCK=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_BLK_DEV_BSG is not set # # IO Schedulers # CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_DEADLINE is not set # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="anticipatory" CONFIG_CLASSIC_RCU=y # # Processor type and features # CONFIG_TICK_ONESHOT=y # CONFIG_NO_HZ is not set CONFIG_HIGH_RES_TIMERS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_SMP=y CONFIG_X86_PC=y # CONFIG_X86_ELAN is not set # CONFIG_X86_VOYAGER is not set # CONFIG_X86_NUMAQ is not set # CONFIG_X86_SUMMIT is not set # CONFIG_X86_BIGSMP is not set # CONFIG_X86_VISWS is not set # CONFIG_X86_GENERICARCH is not set # CONFIG_X86_ES7000 is not set # CONFIG_X86_RDC321X is not set # CONFIG_X86_VSMP is not set # CONFIG_PARAVIRT_GUEST is not set # CONFIG_M386 is not set # CONFIG_M486 is not set # CONFIG_M586 is not set # CONFIG_M586TSC is not set # CONFIG_M586MMX is not set # CONFIG_M686 is not set # CONFIG_MPENTIUMII is not set # CONFIG_MPENTIUMIII is not set # CONFIG_MPENTIUMM is not set # CONFIG_MPENTIUM4 is not set # CONFIG_MK6 is not set # CONFIG_MK7 is not set CONFIG_MK8=y # CONFIG_MCRUSOE is not set # CONFIG_MEFFICEON is not set # CONFIG_MWINCHIPC6 is not set # CONFIG_MWINCHIP2 is not set # CONFIG_MWINCHIP3D is not set # CONFIG_MGEODEGX1 is not set # CONFIG_MGEODE_LX is not set # CONFIG_MCYRIXIII is not set # CONFIG_MVIAC3_2 is not set # CONFIG_MVIAC7 is not set # CONFIG_MPSC is not set # CONFIG_MCORE2 is not set # CONFIG_GENERIC_CPU is not set CONFIG_X86_L1_CACHE_BYTES=64 CONFIG_X86_INTERNODE_CACHE_BYTES=64 CONFIG_X86_CMPXCHG=y CONFIG_X86_L1_CACHE_SHIFT=6 CONFIG_X86_GOOD_APIC=y CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y CONFIG_X86_TSC=y CONFIG_X86_MINIMUM_CPU_FAMILY=64 CONFIG_X86_DEBUGCTLMSR=y CONFIG_HPET_TIMER=y CONFIG_HPET_EMULATE_RTC=y CONFIG_GART_IOMMU=y CONFIG_CALGARY_IOMMU=y # CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT is not set CONFIG_IOMMU_HELPER=y CONFIG_SWIOTLB=y CONFIG_NR_CPUS=8 CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=y # CONFIG_PREEMPT_RCU is not set CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_MCE=y CONFIG_X86_MCE_INTEL=y CONFIG_X86_MCE_AMD=y # CONFIG_I8K is not set CONFIG_MICROCODE=y CONFIG_MICROCODE_OLD_INTERFACE=y CONFIG_X86_MSR=y CONFIG_X86_CPUID=y # CONFIG_NUMA is not set CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_FLATMEM_MANUAL is not set # CONFIG_DISCONTIGMEM_MANUAL is not set CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM=y CONFIG_HAVE_MEMORY_PRESENT=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y CONFIG_SPARSEMEM_VMEMMAP=y # CONFIG_MEMORY_HOTPLUG is not set CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_RESOURCES_64BIT=y CONFIG_ZONE_DMA_FLAG=1 CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y CONFIG_MTRR=y # CONFIG_SECCOMP is not set # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set CONFIG_HZ_1000=y CONFIG_HZ=1000 CONFIG_SCHED_HRTICK=y # CONFIG_KEXEC is not set # CONFIG_CRASH_DUMP is not set CONFIG_PHYSICAL_START=0x200000 # CONFIG_RELOCATABLE is not set CONFIG_PHYSICAL_ALIGN=0x200000 # CONFIG_HOTPLUG_CPU is not set CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # # Power management options # # CONFIG_PM is not set # # CPU Frequency scaling # # CONFIG_CPU_FREQ is not set # CONFIG_CPU_IDLE is not set # # Bus options (PCI etc.) # CONFIG_PCI=y CONFIG_PCI_DIRECT=y CONFIG_PCI_DOMAINS=y # CONFIG_PCIEPORTBUS is not set CONFIG_ARCH_SUPPORTS_MSI=y # CONFIG_PCI_MSI is not set CONFIG_PCI_LEGACY=y CONFIG_HT_IRQ=y CONFIG_ISA_DMA_API=y CONFIG_K8_NB=y # CONFIG_PCCARD is not set # CONFIG_HOTPLUG_PCI is not set # # Executable file formats / Emulations # CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set # CONFIG_IA32_EMULATION is not set # CONFIG_COMPAT_FOR_U64_ALIGNMENT is not set # # Networking # # CONFIG_NET is not set # # Device Drivers # # # Generic Driver Options # CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" # CONFIG_STANDALONE is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set CONFIG_FW_LOADER=y # CONFIG_SYS_HYPERVISOR is not set # CONFIG_MTD is not set # CONFIG_PARPORT is not set CONFIG_BLK_DEV=y CONFIG_BLK_DEV_FD=y # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_CRYPTOLOOP=y # CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_XIP=y CONFIG_CDROM_PKTCDVD=y CONFIG_CDROM_PKTCDVD_BUFFERS=8 # CONFIG_CDROM_PKTCDVD_WCACHE is not set # CONFIG_MISC_DEVICES is not set CONFIG_HAVE_IDE=y # CONFIG_IDE is not set # # SCSI device support # # CONFIG_RAID_ATTRS is not set CONFIG_SCSI=y CONFIG_SCSI_DMA=y CONFIG_SCSI_TGT=y # CONFIG_SCSI_NETLINK is not set CONFIG_SCSI_PROC_FS=y # # SCSI support type (disk, tape, CD-ROM) # CONFIG_BLK_DEV_SD=y CONFIG_CHR_DEV_ST=y CONFIG_CHR_DEV_OSST=y CONFIG_BLK_DEV_SR=y CONFIG_BLK_DEV_SR_VENDOR=y CONFIG_CHR_DEV_SG=y # CONFIG_CHR_DEV_SCH is not set # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # CONFIG_SCSI_MULTI_LUN=y # CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_LOGGING is not set # CONFIG_SCSI_SCAN_ASYNC is not set # # SCSI Transports # CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_FC_ATTRS is not set CONFIG_SCSI_SAS_ATTRS=y CONFIG_SCSI_SAS_LIBSAS=y CONFIG_SCSI_SAS_HOST_SMP=y # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set # CONFIG_SCSI_SRP_ATTRS is not set CONFIG_SCSI_LOWLEVEL=y # CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set CONFIG_SCSI_AIC7XXX=y CONFIG_AIC7XXX_CMDS_PER_DEVICE=8 CONFIG_AIC7XXX_RESET_DELAY_MS=15000 CONFIG_AIC7XXX_BUILD_FIRMWARE=y CONFIG_AIC7XXX_DEBUG_ENABLE=y CONFIG_AIC7XXX_DEBUG_MASK=0 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y # CONFIG_SCSI_AIC7XXX_OLD is not set CONFIG_SCSI_AIC79XX=y CONFIG_AIC79XX_CMDS_PER_DEVICE=8 CONFIG_AIC79XX_RESET_DELAY_MS=15000 CONFIG_AIC79XX_BUILD_FIRMWARE=y CONFIG_AIC79XX_DEBUG_ENABLE=y CONFIG_AIC79XX_DEBUG_MASK=0 CONFIG_AIC79XX_REG_PRETTY_PRINT=y CONFIG_SCSI_AIC94XX=y CONFIG_AIC94XX_DEBUG=y # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_ARCMSR is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set # CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_MVSAS is not set # CONFIG_SCSI_STEX is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_LPFC is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_SRP is not set # CONFIG_ATA is not set # CONFIG_MD is not set # CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support # # CONFIG_FIREWIRE is not set # CONFIG_IEEE1394 is not set # CONFIG_I2O is not set # CONFIG_MACINTOSH_DRIVERS is not set # CONFIG_PHONE is not set # # Input device support # CONFIG_INPUT=y # CONFIG_INPUT_FF_MEMLESS is not set CONFIG_INPUT_POLLDEV=y # # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_EVBUG is not set # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_STOWAWAY is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y CONFIG_MOUSE_PS2_ALPS=y CONFIG_MOUSE_PS2_LOGIPS2PP=y CONFIG_MOUSE_PS2_SYNAPTICS=y CONFIG_MOUSE_PS2_LIFEBOOK=y CONFIG_MOUSE_PS2_TRACKPOINT=y CONFIG_MOUSE_PS2_TOUCHKIT=y CONFIG_MOUSE_SERIAL=y # CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # # Hardware I/O ports # CONFIG_SERIO=y CONFIG_SERIO_I8042=y CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set CONFIG_SERIO_PCIPS2=y CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set CONFIG_GAMEPORT=y CONFIG_GAMEPORT_NS558=y # CONFIG_GAMEPORT_L4 is not set # CONFIG_GAMEPORT_EMU10K1 is not set # CONFIG_GAMEPORT_FM801 is not set # # Character devices # CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y # CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_NOZOMI is not set # # Serial drivers # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_NR_UARTS=4 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_MANY_PORTS=y CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_DETECT_IRQ=y # CONFIG_SERIAL_8250_RSA is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set # CONFIG_IPMI_HANDLER is not set # CONFIG_HW_RANDOM is not set CONFIG_NVRAM=y CONFIG_RTC=y # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set # CONFIG_MWAVE is not set # CONFIG_PC8736x_GPIO is not set CONFIG_RAW_DRIVER=y CONFIG_MAX_RAW_DEVS=256 # CONFIG_HANGCHECK_TIMER is not set # CONFIG_TCG_TPM is not set # CONFIG_TELCLOCK is not set CONFIG_DEVPORT=y # CONFIG_I2C is not set # # SPI support # # CONFIG_SPI is not set # CONFIG_SPI_MASTER is not set # CONFIG_W1 is not set CONFIG_POWER_SUPPLY=y # CONFIG_POWER_SUPPLY_DEBUG is not set # CONFIG_PDA_POWER is not set # CONFIG_BATTERY_DS2760 is not set CONFIG_HWMON=y # CONFIG_HWMON_VID is not set # CONFIG_SENSORS_ABITUGURU is not set # CONFIG_SENSORS_ABITUGURU3 is not set # CONFIG_SENSORS_K8TEMP is not set # CONFIG_SENSORS_I5K_AMB is not set # CONFIG_SENSORS_F71805F is not set # CONFIG_SENSORS_F71882FG is not set # CONFIG_SENSORS_CORETEMP is not set # CONFIG_SENSORS_IT87 is not set # CONFIG_SENSORS_PC87360 is not set # CONFIG_SENSORS_PC87427 is not set # CONFIG_SENSORS_SIS5595 is not set # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_SMSC47B397 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT1211 is not set # CONFIG_SENSORS_VT8231 is not set # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set # CONFIG_SENSORS_HDAPS is not set # CONFIG_SENSORS_APPLESMC is not set # CONFIG_HWMON_DEBUG_CHIP is not set CONFIG_THERMAL=y # CONFIG_WATCHDOG is not set # # Sonics Silicon Backplane # CONFIG_SSB_POSSIBLE=y # CONFIG_SSB is not set # # Multifunction device drivers # # CONFIG_MFD_SM501 is not set # # Multimedia devices # # CONFIG_VIDEO_DEV is not set # CONFIG_DAB is not set # # Graphics support # CONFIG_AGP=y CONFIG_AGP_AMD64=y CONFIG_AGP_INTEL=y # CONFIG_AGP_SIS is not set CONFIG_AGP_VIA=y # CONFIG_DRM is not set # CONFIG_VGASTATE is not set # CONFIG_VIDEO_OUTPUT_CONTROL is not set # CONFIG_FB is not set # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Display device support # # CONFIG_DISPLAY_SUPPORT is not set # # Console display driver support # CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 CONFIG_VIDEO_SELECT=y CONFIG_DUMMY_CONSOLE=y # # Sound # # CONFIG_SOUND is not set # CONFIG_HID_SUPPORT is not set # CONFIG_USB_SUPPORT is not set # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set # CONFIG_NEW_LEDS is not set # CONFIG_INFINIBAND is not set # CONFIG_EDAC is not set # CONFIG_RTC_CLASS is not set # CONFIG_DMADEVICES is not set # # Userspace I/O # # CONFIG_UIO is not set # # Firmware Drivers # # CONFIG_EDD is not set # CONFIG_DELL_RBU is not set # CONFIG_DCDBAS is not set # CONFIG_DMIID is not set # # File systems # # CONFIG_EXT2_FS is not set # CONFIG_EXT3_FS is not set # CONFIG_EXT4DEV_FS is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y # CONFIG_XFS_FS is not set # CONFIG_GFS2_FS is not set # CONFIG_DNOTIFY is not set # CONFIG_INOTIFY is not set # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set CONFIG_GENERIC_ACL=y # # CD-ROM/DVD Filesystems # # CONFIG_ISO9660_FS is not set # CONFIG_UDF_FS is not set # # DOS/FAT/NT Filesystems # # CONFIG_MSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_PROC_SYSCTL=y CONFIG_SYSFS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y CONFIG_CONFIGFS_FS=y # # Miscellaneous filesystems # # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_CODEPAGE_437 is not set # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set # CONFIG_NLS_CODEPAGE_850 is not set # CONFIG_NLS_CODEPAGE_852 is not set # CONFIG_NLS_CODEPAGE_855 is not set # CONFIG_NLS_CODEPAGE_857 is not set # CONFIG_NLS_CODEPAGE_860 is not set # CONFIG_NLS_CODEPAGE_861 is not set # CONFIG_NLS_CODEPAGE_862 is not set # CONFIG_NLS_CODEPAGE_863 is not set # CONFIG_NLS_CODEPAGE_864 is not set # CONFIG_NLS_CODEPAGE_865 is not set # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set # CONFIG_NLS_CODEPAGE_936 is not set # CONFIG_NLS_CODEPAGE_950 is not set # CONFIG_NLS_CODEPAGE_932 is not set # CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set # CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set # CONFIG_NLS_ISO8859_9 is not set # CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set # # Kernel hacking # CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set # CONFIG_MAGIC_SYSRQ is not set # CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_KERNEL is not set # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_LATENCYTOP is not set # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set # CONFIG_SAMPLES is not set # CONFIG_EARLY_PRINTK is not set CONFIG_X86_MPPARSE=y CONFIG_IO_DELAY_TYPE_0X80=0 CONFIG_IO_DELAY_TYPE_0XED=1 CONFIG_IO_DELAY_TYPE_UDELAY=2 CONFIG_IO_DELAY_TYPE_NONE=3 CONFIG_IO_DELAY_0X80=y # CONFIG_IO_DELAY_0XED is not set # CONFIG_IO_DELAY_UDELAY is not set # CONFIG_IO_DELAY_NONE is not set CONFIG_DEFAULT_IO_DELAY_TYPE=0 # # Security options # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set # CONFIG_SECURITY_FILE_CAPABILITIES is not set CONFIG_CRYPTO=y CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_BLKCIPHER=y # CONFIG_CRYPTO_SEQIV is not set CONFIG_CRYPTO_MANAGER=y # CONFIG_CRYPTO_HMAC is not set # CONFIG_CRYPTO_XCBC is not set # CONFIG_CRYPTO_NULL is not set # CONFIG_CRYPTO_MD4 is not set # CONFIG_CRYPTO_MD5 is not set # CONFIG_CRYPTO_SHA1 is not set # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set # CONFIG_CRYPTO_WP512 is not set # CONFIG_CRYPTO_TGR192 is not set # CONFIG_CRYPTO_GF128MUL is not set # CONFIG_CRYPTO_ECB is not set CONFIG_CRYPTO_CBC=y # CONFIG_CRYPTO_PCBC is not set # CONFIG_CRYPTO_LRW is not set # CONFIG_CRYPTO_XTS is not set # CONFIG_CRYPTO_CTR is not set # CONFIG_CRYPTO_GCM is not set # CONFIG_CRYPTO_CCM is not set # CONFIG_CRYPTO_CRYPTD is not set # CONFIG_CRYPTO_DES is not set # CONFIG_CRYPTO_FCRYPT is not set # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set # CONFIG_CRYPTO_TWOFISH_X86_64 is not set # CONFIG_CRYPTO_SERPENT is not set # CONFIG_CRYPTO_AES is not set # CONFIG_CRYPTO_AES_X86_64 is not set # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_KHAZAD is not set # CONFIG_CRYPTO_ANUBIS is not set # CONFIG_CRYPTO_SEED is not set # CONFIG_CRYPTO_SALSA20 is not set # CONFIG_CRYPTO_SALSA20_X86_64 is not set # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_CAMELLIA is not set # CONFIG_CRYPTO_AUTHENC is not set # CONFIG_CRYPTO_LZO is not set # CONFIG_CRYPTO_HW is not set CONFIG_HAVE_KVM=y # CONFIG_VIRTUALIZATION is not set # # Library routines # CONFIG_BITREVERSE=y CONFIG_CRC_CCITT=y CONFIG_CRC16=y CONFIG_CRC_ITU_T=y CONFIG_CRC32=y # CONFIG_CRC7 is not set CONFIG_LIBCRC32C=y CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2008-04-15 20:10 ` Denys Vlasenko @ 2008-04-21 5:10 ` Denys Vlasenko 0 siblings, 0 replies; 24+ messages in thread From: Denys Vlasenko @ 2008-04-21 5:10 UTC (permalink / raw) To: Hannes Reinecke; +Cc: linux-scsi, Andrew Morton Hi Hannes, Apologies for being so nasty, but I am pinging you again. Which tree and with which .config file is known to correctly rebuild aic7xxx firmware? On Tuesday 15 April 2008 22:10, Denys Vlasenko wrote: > I'm afraid I will continue to bug you - it does not work. :(. > > I applied your patch and I still couldn't get it to compile. > I thought that it may be caused by me using not the latest scsi-misc-2.6 > git tree, so I downloaded the tree and retried. Alas, same result. > > I followed your instructions: > > > Anyway, you'll have to enable the firmware build for aic7xxx / aic79xx > > and do a diff between the files used for compiling and the *_shipped > > files. > > Then fixup the assembler in aicasm/* to print out the files in the way > > you'd like it. > > Once you're done you copy the generated files over to the *_shipped > > files and send the diff. > > See attached .config file with firmware build options enabled. > > Since I want *_shipped files regenerated, they, obviously, should not > take part in the build, so I renamed tham all to *_shipped-OFF, > intending later to rediff them against newly-generated files. > > Then I ran "make bzImage" (64-bit x86) and got this error: > > ... > LD drivers/power/built-in.o > CC drivers/scsi/scsi.o > CC drivers/scsi/hosts.o > CC drivers/scsi/scsi_ioctl.o > CC drivers/scsi/constants.o > CC drivers/scsi/scsicam.o > CC drivers/scsi/scsi_error.o > CC drivers/scsi/scsi_lib.o > CC drivers/scsi/scsi_lib_dma.o > CC drivers/scsi/scsi_scan.o > CC drivers/scsi/scsi_sysfs.o > CC drivers/scsi/scsi_devinfo.o > CC drivers/scsi/scsi_sysctl.o > CC drivers/scsi/scsi_proc.o > CC drivers/scsi/scsi_tgt_lib.o > CC drivers/scsi/scsi_tgt_if.o > CC drivers/scsi/sd.o > CC drivers/scsi/sr.o > CC drivers/scsi/sr_ioctl.o > CC drivers/scsi/sr_vendor.o > LD drivers/scsi/scsi_mod.o > LD drivers/scsi/scsi_tgt.o > CC drivers/scsi/scsi_transport_spi.o > CC drivers/scsi/scsi_transport_sas.o > drivers/scsi/aic7xxx/aicasm/aicasm -Idrivers/scsi/aic7xxx -r drivers/scsi/aic7xxx/aic79xx_reg.h \ > -p drivers/scsi/aic7xxx/aic79xx_reg_print.c -i aic79xx_osm.h -o drivers/scsi/aic7xxx/aic79xx_seq.h \ > drivers/scsi/aic7xxx/aic79xx.seq > drivers/scsi/aic7xxx/aicasm/aicasm: Stopped at file drivers/scsi/aic7xxx/aic79xx.seq, line 263 - Invalid bit(s) 0xffffff00 in immediate wr > itten to ACCUM > drivers/scsi/aic7xxx/aicasm/aicasm: Removing drivers/scsi/aic7xxx/aic79xx_seq.h due to error > drivers/scsi/aic7xxx/aicasm/aicasm: Removing drivers/scsi/aic7xxx/aic79xx_reg.h due to error > make[3]: *** [drivers/scsi/aic7xxx/aic79xx_seq.h] Error 65 > make[2]: *** [drivers/scsi/aic7xxx] Error 2 > make[1]: *** [drivers/scsi] Error 2 > make: *** [drivers] Error 2 > > This was on today's unmodified scsi-misc-2.6 git tree. > > Please help. > -- > vda ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2008-04-08 14:08 ` Denys Vlasenko 2008-04-08 14:54 ` Hannes Reinecke @ 2008-04-14 18:46 ` Denys Vlasenko 2008-04-15 14:44 ` Hannes Reinecke 1 sibling, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2008-04-14 18:46 UTC (permalink / raw) To: Hannes Reinecke; +Cc: Andrew Morton, linux-scsi Hi Hannes, On Tuesday 08 April 2008 16:08, Denys Vlasenko wrote: > > > #if 0 / #endif block ends up containing definitions of 290 functions/macros, > > > none of which is EVER used. I used this script (below) and verified that > > > they are never mentioned anywhere outside of *_shipped files. > > > I also did test builds with and without debug enabled and they build > > > with no problems. No undefined references! > > > > > Well, still not quite. The point here is that all of the functions in the > > *_shipped files are in fact auto-generated by aicasm, based on the definitions > > in aic79xx.seq and aic79xx.reg. So the *_reg_print.c files contains > > functions for all _defined_ registers, not the actually used ones. > > What we have to do here is to modify aicasm to not print out the > > unused definitions, and copy those (autogenerated) files over to > > the *_shipped files to have them synced properly. > > Hand-patching the *_shipped files is not a good idea. > > I do understand this, and I do understnad then _shipped files > are generated. But I failed to find out HOW they are generated. > I don't want to _only_ patch aicasm/* files and skip checking > that my changes work (or at least compile). > > Please let me know how to regenerate these _shipped files, > and I will fix it "correctly" by modifying aicasm/* files. I didn't get any reply. Perhaps you were busy with more important stuff. Ping! :) -- vda ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2008-04-14 18:46 ` Denys Vlasenko @ 2008-04-15 14:44 ` Hannes Reinecke 0 siblings, 0 replies; 24+ messages in thread From: Hannes Reinecke @ 2008-04-15 14:44 UTC (permalink / raw) To: Denys Vlasenko; +Cc: linux-scsi Hi Denys, Denys Vlasenko wrote: > Hi Hannes, > > On Tuesday 08 April 2008 16:08, Denys Vlasenko wrote: [ .. ] >> I do understand this, and I do understnad then _shipped files >> are generated. But I failed to find out HOW they are generated. >> I don't want to _only_ patch aicasm/* files and skip checking >> that my changes work (or at least compile). >> >> Please let me know how to regenerate these _shipped files, >> and I will fix it "correctly" by modifying aicasm/* files. > > I didn't get any reply. Perhaps you were busy with more important stuff. > There are such strange creatures named 'customers'. They have a habit of get into the way ... But I thought I had answered this already ... Anyway, you'll have to enable the firmware build for aic7xxx / aic79xx and do a diff between the files used for compiling and the *_shipped files. Then fixup the assembler in aicasm/* to print out the files in the way you'd like it. Once you're done you copy the generated files over to the *_shipped files and send the diff. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 1/3] debloat aic7xxx and aic79xx drivers 2008-03-23 3:41 ` [PATCH 1/3] " Denys Vlasenko 2008-03-23 3:42 ` [PATCH 2/3] " Denys Vlasenko @ 2008-04-07 10:31 ` Hannes Reinecke 2008-04-07 18:01 ` Denys Vlasenko 1 sibling, 1 reply; 24+ messages in thread From: Hannes Reinecke @ 2008-04-07 10:31 UTC (permalink / raw) To: Denys Vlasenko; +Cc: Andrew Morton, linux-scsi, linux-kernel Hi Denys, Denys Vlasenko wrote: > Deinlines and moves big functions from .h to .c files. > Adds prototypes for ahc_lookup_scb and ahd_lookup_scb to .h files. > > Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> > -- > vda Patch looks good to me. Signed-off-by: Hannes Reinecke <hare@suse.de> Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 1/3] debloat aic7xxx and aic79xx drivers 2008-04-07 10:31 ` [PATCH 1/3] " Hannes Reinecke @ 2008-04-07 18:01 ` Denys Vlasenko 0 siblings, 0 replies; 24+ messages in thread From: Denys Vlasenko @ 2008-04-07 18:01 UTC (permalink / raw) To: Hannes Reinecke; +Cc: Andrew Morton, linux-scsi, linux-kernel On Monday 07 April 2008 12:31, Hannes Reinecke wrote: > Hi Denys, > > Denys Vlasenko wrote: > > Deinlines and moves big functions from .h to .c files. > > Adds prototypes for ahc_lookup_scb and ahd_lookup_scb to .h files. > > > > Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> > > -- > > vda > Patch looks good to me. > > Signed-off-by: Hannes Reinecke <hare@suse.de> Thanks! Please, queue it up in linux-scsi tree. -- vda ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] debloat aic7xxx and aic79xx drivers
@ 2007-10-14 14:58 Denys Vlasenko
2007-10-14 15:00 ` [PATCH 1/3] " Denys Vlasenko
0 siblings, 1 reply; 24+ messages in thread
From: Denys Vlasenko @ 2007-10-14 14:58 UTC (permalink / raw)
To: Andrew Morton; +Cc: Hannes Reinecke, linux-scsi, linux-kernel
Hi,
Following patches debloat drivers/scsi/aic7xxx/*.
I also had to add prototypes for ahc_lookup_scb
and ahd_lookup_scb to .h files.
1-debloat.patch
Deinlines and moves big functions from .h to .c files.
Adds prototypes for ahc_lookup_scb and ahd_lookup_scb to .h files.
2-addstatic.patch
Adds statics, #ifdefs out huge amount of unused code, adds consts
3-addconst.patch
Adds more consts
Driver code/data size reductions:
Build with debugging on (CONFIG_AIC7XXX_DEBUG_ENABLE=y):
text data bss dec hex filename
310865 49922 1204 361991 58607 linux-2.6.23.t/drivers/scsi/aic7xxx/built-in.o
221987 2754 1204 225945 37299 linux-2.6.23-aic-3-addconst.t/drivers/scsi/aic7xxx/built-in.o
With debugging off:
text data bss dec hex filename
298896 42754 1172 342822 53b26 linux-2.6.23.tt/drivers/scsi/aic7xxx/built-in.o
216068 2754 1172 219994 35b5a linux-2.6.23-aic-3-addconst.tt/drivers/scsi/aic7xxx/built-in.o
make namespacecheck goes from 400+ functions to:
drivers/scsi/aic7xxx/aic79xx_core.o
ahd_inq
ahd_inw
ahd_outq
ahd_outw
drivers/scsi/aic7xxx/aic79xx_osm.o
ahd_insb
drivers/scsi/aic7xxx/aic7xxx_core.o
ahc_inq
ahc_outq
drivers/scsi/aic7xxx/aic7xxx_osm.o
ahc_insb
None of these patches touch any logic, code changes are pretty minimal.
Compile tested and applies cleanly to 2.6.23.
I don't have this hardware anymore and cannot run test these patches.
Please apply.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
^ permalink raw reply [flat|nested] 24+ messages in thread* [PATCH 1/3] debloat aic7xxx and aic79xx drivers 2007-10-14 14:58 [PATCH 0/3] " Denys Vlasenko @ 2007-10-14 15:00 ` Denys Vlasenko 2007-10-14 15:01 ` [PATCH 2/3] " Denys Vlasenko 0 siblings, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2007-10-14 15:00 UTC (permalink / raw) To: Andrew Morton; +Cc: Hannes Reinecke, linux-scsi, linux-kernel [-- Attachment #1: Type: text/plain, Size: 188 bytes --] Deinlines and moves big functions from .h to .c files. Adds prototypes for ahc_lookup_scb and ahd_lookup_scb to .h files. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> -- vda [-- Attachment #2: linux-2.6.23-aic-1-debloat.patch --] [-- Type: text/x-diff, Size: 104906 bytes --] diff -urpN linux-2.6.23/drivers/scsi/aic7xxx/aic79xx_core.c linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_core.c --- linux-2.6.23/drivers/scsi/aic7xxx/aic79xx_core.c 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_core.c 2007-10-14 15:02:44.000000000 +0100 @@ -266,8 +266,752 @@ static int ahd_match_scb(struct ahd_sof int target, char channel, int lun, u_int tag, role_t role); -/******************************** Private Inlines *****************************/ +/************************ Sequencer Execution Control *************************/ +void +ahd_set_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) +{ + if (ahd->src_mode == src && ahd->dst_mode == dst) + return; +#ifdef AHD_DEBUG + if (ahd->src_mode == AHD_MODE_UNKNOWN + || ahd->dst_mode == AHD_MODE_UNKNOWN) + panic("Setting mode prior to saving it.\n"); + if ((ahd_debug & AHD_SHOW_MODEPTR) != 0) + printf("%s: Setting mode 0x%x\n", ahd_name(ahd), + ahd_build_mode_state(ahd, src, dst)); +#endif + ahd_outb(ahd, MODE_PTR, ahd_build_mode_state(ahd, src, dst)); + ahd->src_mode = src; + ahd->dst_mode = dst; +} + +void +ahd_update_modes(struct ahd_softc *ahd) +{ + ahd_mode_state mode_ptr; + ahd_mode src; + ahd_mode dst; + + mode_ptr = ahd_inb(ahd, MODE_PTR); +#ifdef AHD_DEBUG + if ((ahd_debug & AHD_SHOW_MODEPTR) != 0) + printf("Reading mode 0x%x\n", mode_ptr); +#endif + ahd_extract_mode_state(ahd, mode_ptr, &src, &dst); + ahd_known_modes(ahd, src, dst); +} + +void +ahd_assert_modes(struct ahd_softc *ahd, ahd_mode srcmode, + ahd_mode dstmode, const char *file, int line) +{ +#ifdef AHD_DEBUG + if ((srcmode & AHD_MK_MSK(ahd->src_mode)) == 0 + || (dstmode & AHD_MK_MSK(ahd->dst_mode)) == 0) { + panic("%s:%s:%d: Mode assertion failed.\n", + ahd_name(ahd), file, line); + } +#endif +} + +#define AHD_ASSERT_MODES(ahd, source, dest) \ + ahd_assert_modes(ahd, source, dest, __FILE__, __LINE__); + +ahd_mode_state +ahd_save_modes(struct ahd_softc *ahd) +{ + if (ahd->src_mode == AHD_MODE_UNKNOWN + || ahd->dst_mode == AHD_MODE_UNKNOWN) + ahd_update_modes(ahd); + + return (ahd_build_mode_state(ahd, ahd->src_mode, ahd->dst_mode)); +} + +void +ahd_restore_modes(struct ahd_softc *ahd, ahd_mode_state state) +{ + ahd_mode src; + ahd_mode dst; + + ahd_extract_mode_state(ahd, state, &src, &dst); + ahd_set_modes(ahd, src, dst); +} + +/* + * Determine whether the sequencer has halted code execution. + * Returns non-zero status if the sequencer is stopped. + */ +int +ahd_is_paused(struct ahd_softc *ahd) +{ + return ((ahd_inb(ahd, HCNTRL) & PAUSE) != 0); +} + +/* + * Request that the sequencer stop and wait, indefinitely, for it + * to stop. The sequencer will only acknowledge that it is paused + * once it has reached an instruction boundary and PAUSEDIS is + * cleared in the SEQCTL register. The sequencer may use PAUSEDIS + * for critical sections. + */ +void +ahd_pause(struct ahd_softc *ahd) +{ + ahd_outb(ahd, HCNTRL, ahd->pause); + + /* + * Since the sequencer can disable pausing in a critical section, we + * must loop until it actually stops. + */ + while (ahd_is_paused(ahd) == 0) + ; +} + +/* + * Allow the sequencer to continue program execution. + * We check here to ensure that no additional interrupt + * sources that would cause the sequencer to halt have been + * asserted. If, for example, a SCSI bus reset is detected + * while we are fielding a different, pausing, interrupt type, + * we don't want to release the sequencer before going back + * into our interrupt handler and dealing with this new + * condition. + */ +void +ahd_unpause(struct ahd_softc *ahd) +{ + /* + * Automatically restore our modes to those saved + * prior to the first change of the mode. + */ + if (ahd->saved_src_mode != AHD_MODE_UNKNOWN + && ahd->saved_dst_mode != AHD_MODE_UNKNOWN) { + if ((ahd->flags & AHD_UPDATE_PEND_CMDS) != 0) + ahd_reset_cmds_pending(ahd); + ahd_set_modes(ahd, ahd->saved_src_mode, ahd->saved_dst_mode); + } + + if ((ahd_inb(ahd, INTSTAT) & ~CMDCMPLT) == 0) + ahd_outb(ahd, HCNTRL, ahd->unpause); + + ahd_known_modes(ahd, AHD_MODE_UNKNOWN, AHD_MODE_UNKNOWN); +} + +/*********************** Scatter Gather List Handling *************************/ +void * +ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb, + void *sgptr, dma_addr_t addr, bus_size_t len, int last) +{ + scb->sg_count++; + if (sizeof(dma_addr_t) > 4 + && (ahd->flags & AHD_64BIT_ADDRESSING) != 0) { + struct ahd_dma64_seg *sg; + + sg = (struct ahd_dma64_seg *)sgptr; + sg->addr = ahd_htole64(addr); + sg->len = ahd_htole32(len | (last ? AHD_DMA_LAST_SEG : 0)); + return (sg + 1); + } else { + struct ahd_dma_seg *sg; + + sg = (struct ahd_dma_seg *)sgptr; + sg->addr = ahd_htole32(addr & 0xFFFFFFFF); + sg->len = ahd_htole32(len | ((addr >> 8) & 0x7F000000) + | (last ? AHD_DMA_LAST_SEG : 0)); + return (sg + 1); + } +} + +void +ahd_setup_scb_common(struct ahd_softc *ahd, struct scb *scb) +{ + /* XXX Handle target mode SCBs. */ + scb->crc_retry_count = 0; + if ((scb->flags & SCB_PACKETIZED) != 0) { + /* XXX what about ACA?? It is type 4, but TAG_TYPE == 0x3. */ + scb->hscb->task_attribute = scb->hscb->control & SCB_TAG_TYPE; + } else { + if (ahd_get_transfer_length(scb) & 0x01) + scb->hscb->task_attribute = SCB_XFERLEN_ODD; + else + scb->hscb->task_attribute = 0; + } + + if (scb->hscb->cdb_len <= MAX_CDB_LEN_WITH_SENSE_ADDR + || (scb->hscb->cdb_len & SCB_CDB_LEN_PTR) != 0) + scb->hscb->shared_data.idata.cdb_plus_saddr.sense_addr = + ahd_htole32(scb->sense_busaddr); +} + +void +ahd_setup_data_scb(struct ahd_softc *ahd, struct scb *scb) +{ + /* + * Copy the first SG into the "current" data ponter area. + */ + if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) { + struct ahd_dma64_seg *sg; + + sg = (struct ahd_dma64_seg *)scb->sg_list; + scb->hscb->dataptr = sg->addr; + scb->hscb->datacnt = sg->len; + } else { + struct ahd_dma_seg *sg; + uint32_t *dataptr_words; + + sg = (struct ahd_dma_seg *)scb->sg_list; + dataptr_words = (uint32_t*)&scb->hscb->dataptr; + dataptr_words[0] = sg->addr; + dataptr_words[1] = 0; + if ((ahd->flags & AHD_39BIT_ADDRESSING) != 0) { + uint64_t high_addr; + + high_addr = ahd_le32toh(sg->len) & 0x7F000000; + scb->hscb->dataptr |= ahd_htole64(high_addr << 8); + } + scb->hscb->datacnt = sg->len; + } + /* + * Note where to find the SG entries in bus space. + * We also set the full residual flag which the + * sequencer will clear as soon as a data transfer + * occurs. + */ + scb->hscb->sgptr = ahd_htole32(scb->sg_list_busaddr|SG_FULL_RESID); +} + +void +ahd_setup_noxfer_scb(struct ahd_softc *ahd, struct scb *scb) +{ + scb->hscb->sgptr = ahd_htole32(SG_LIST_NULL); + scb->hscb->dataptr = 0; + scb->hscb->datacnt = 0; +} + +/************************** Memory mapping routines ***************************/ +void * +ahd_sg_bus_to_virt(struct ahd_softc *ahd, struct scb *scb, uint32_t sg_busaddr) +{ + dma_addr_t sg_offset; + + /* sg_list_phys points to entry 1, not 0 */ + sg_offset = sg_busaddr - (scb->sg_list_busaddr - ahd_sg_size(ahd)); + return ((uint8_t *)scb->sg_list + sg_offset); +} + +uint32_t +ahd_sg_virt_to_bus(struct ahd_softc *ahd, struct scb *scb, void *sg) +{ + dma_addr_t sg_offset; + + /* sg_list_phys points to entry 1, not 0 */ + sg_offset = ((uint8_t *)sg - (uint8_t *)scb->sg_list) + - ahd_sg_size(ahd); + + return (scb->sg_list_busaddr + sg_offset); +} + +void +ahd_sync_scb(struct ahd_softc *ahd, struct scb *scb, int op) +{ + ahd_dmamap_sync(ahd, ahd->scb_data.hscb_dmat, + scb->hscb_map->dmamap, + /*offset*/(uint8_t*)scb->hscb - scb->hscb_map->vaddr, + /*len*/sizeof(*scb->hscb), op); +} + +void +ahd_sync_sglist(struct ahd_softc *ahd, struct scb *scb, int op) +{ + if (scb->sg_count == 0) + return; + + ahd_dmamap_sync(ahd, ahd->scb_data.sg_dmat, + scb->sg_map->dmamap, + /*offset*/scb->sg_list_busaddr - ahd_sg_size(ahd), + /*len*/ahd_sg_size(ahd) * scb->sg_count, op); +} + +void +ahd_sync_sense(struct ahd_softc *ahd, struct scb *scb, int op) +{ + ahd_dmamap_sync(ahd, ahd->scb_data.sense_dmat, + scb->sense_map->dmamap, + /*offset*/scb->sense_busaddr, + /*len*/AHD_SENSE_BUFSIZE, op); +} + +uint32_t +ahd_targetcmd_offset(struct ahd_softc *ahd, u_int index) +{ + return (((uint8_t *)&ahd->targetcmds[index]) + - (uint8_t *)ahd->qoutfifo); +} + +/*********************** Miscelaneous Support Functions ***********************/ +/* + * Return pointers to the transfer negotiation information + * for the specified our_id/remote_id pair. + */ +struct ahd_initiator_tinfo * +ahd_fetch_transinfo(struct ahd_softc *ahd, char channel, u_int our_id, + u_int remote_id, struct ahd_tmode_tstate **tstate) +{ + /* + * Transfer data structures are stored from the perspective + * of the target role. Since the parameters for a connection + * in the initiator role to a given target are the same as + * when the roles are reversed, we pretend we are the target. + */ + if (channel == 'B') + our_id += 8; + *tstate = ahd->enabled_targets[our_id]; + return (&(*tstate)->transinfo[remote_id]); +} + +uint16_t +ahd_inw(struct ahd_softc *ahd, u_int port) +{ + /* + * Read high byte first as some registers increment + * or have other side effects when the low byte is + * read. + */ + uint16_t r = ahd_inb(ahd, port+1) << 8; + return r | ahd_inb(ahd, port); +} + +void +ahd_outw(struct ahd_softc *ahd, u_int port, u_int value) +{ + /* + * Write low byte first to accomodate registers + * such as PRGMCNT where the order maters. + */ + ahd_outb(ahd, port, value & 0xFF); + ahd_outb(ahd, port+1, (value >> 8) & 0xFF); +} + +uint32_t +ahd_inl(struct ahd_softc *ahd, u_int port) +{ + return ((ahd_inb(ahd, port)) + | (ahd_inb(ahd, port+1) << 8) + | (ahd_inb(ahd, port+2) << 16) + | (ahd_inb(ahd, port+3) << 24)); +} + +void +ahd_outl(struct ahd_softc *ahd, u_int port, uint32_t value) +{ + ahd_outb(ahd, port, (value) & 0xFF); + ahd_outb(ahd, port+1, ((value) >> 8) & 0xFF); + ahd_outb(ahd, port+2, ((value) >> 16) & 0xFF); + ahd_outb(ahd, port+3, ((value) >> 24) & 0xFF); +} + +uint64_t +ahd_inq(struct ahd_softc *ahd, u_int port) +{ + return ((ahd_inb(ahd, port)) + | (ahd_inb(ahd, port+1) << 8) + | (ahd_inb(ahd, port+2) << 16) + | (ahd_inb(ahd, port+3) << 24) + | (((uint64_t)ahd_inb(ahd, port+4)) << 32) + | (((uint64_t)ahd_inb(ahd, port+5)) << 40) + | (((uint64_t)ahd_inb(ahd, port+6)) << 48) + | (((uint64_t)ahd_inb(ahd, port+7)) << 56)); +} + +void +ahd_outq(struct ahd_softc *ahd, u_int port, uint64_t value) +{ + ahd_outb(ahd, port, value & 0xFF); + ahd_outb(ahd, port+1, (value >> 8) & 0xFF); + ahd_outb(ahd, port+2, (value >> 16) & 0xFF); + ahd_outb(ahd, port+3, (value >> 24) & 0xFF); + ahd_outb(ahd, port+4, (value >> 32) & 0xFF); + ahd_outb(ahd, port+5, (value >> 40) & 0xFF); + ahd_outb(ahd, port+6, (value >> 48) & 0xFF); + ahd_outb(ahd, port+7, (value >> 56) & 0xFF); +} + +u_int +ahd_get_scbptr(struct ahd_softc *ahd) +{ + AHD_ASSERT_MODES(ahd, ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK), + ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK)); + return (ahd_inb(ahd, SCBPTR) | (ahd_inb(ahd, SCBPTR + 1) << 8)); +} + +void +ahd_set_scbptr(struct ahd_softc *ahd, u_int scbptr) +{ + AHD_ASSERT_MODES(ahd, ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK), + ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK)); + ahd_outb(ahd, SCBPTR, scbptr & 0xFF); + ahd_outb(ahd, SCBPTR+1, (scbptr >> 8) & 0xFF); +} + +u_int +ahd_get_hnscb_qoff(struct ahd_softc *ahd) +{ + return (ahd_inw_atomic(ahd, HNSCB_QOFF)); +} + +void +ahd_set_hnscb_qoff(struct ahd_softc *ahd, u_int value) +{ + ahd_outw_atomic(ahd, HNSCB_QOFF, value); +} + +u_int +ahd_get_hescb_qoff(struct ahd_softc *ahd) +{ + return (ahd_inb(ahd, HESCB_QOFF)); +} + +void +ahd_set_hescb_qoff(struct ahd_softc *ahd, u_int value) +{ + ahd_outb(ahd, HESCB_QOFF, value); +} + +u_int +ahd_get_snscb_qoff(struct ahd_softc *ahd) +{ + u_int oldvalue; + + AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); + oldvalue = ahd_inw(ahd, SNSCB_QOFF); + ahd_outw(ahd, SNSCB_QOFF, oldvalue); + return (oldvalue); +} + +void +ahd_set_snscb_qoff(struct ahd_softc *ahd, u_int value) +{ + AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); + ahd_outw(ahd, SNSCB_QOFF, value); +} + +u_int +ahd_get_sescb_qoff(struct ahd_softc *ahd) +{ + AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); + return (ahd_inb(ahd, SESCB_QOFF)); +} + +void +ahd_set_sescb_qoff(struct ahd_softc *ahd, u_int value) +{ + AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); + ahd_outb(ahd, SESCB_QOFF, value); +} + +u_int +ahd_get_sdscb_qoff(struct ahd_softc *ahd) +{ + AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); + return (ahd_inb(ahd, SDSCB_QOFF) | (ahd_inb(ahd, SDSCB_QOFF + 1) << 8)); +} + +void +ahd_set_sdscb_qoff(struct ahd_softc *ahd, u_int value) +{ + AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); + ahd_outb(ahd, SDSCB_QOFF, value & 0xFF); + ahd_outb(ahd, SDSCB_QOFF+1, (value >> 8) & 0xFF); +} + +u_int +ahd_inb_scbram(struct ahd_softc *ahd, u_int offset) +{ + u_int value; + /* + * Workaround PCI-X Rev A. hardware bug. + * After a host read of SCB memory, the chip + * may become confused into thinking prefetch + * was required. This starts the discard timer + * running and can cause an unexpected discard + * timer interrupt. The work around is to read + * a normal register prior to the exhaustion of + * the discard timer. The mode pointer register + * has no side effects and so serves well for + * this purpose. + * + * Razor #528 + */ + value = ahd_inb(ahd, offset); + if ((ahd->bugs & AHD_PCIX_SCBRAM_RD_BUG) != 0) + ahd_inb(ahd, MODE_PTR); + return (value); +} + +u_int +ahd_inw_scbram(struct ahd_softc *ahd, u_int offset) +{ + return (ahd_inb_scbram(ahd, offset) + | (ahd_inb_scbram(ahd, offset+1) << 8)); +} + +uint32_t +ahd_inl_scbram(struct ahd_softc *ahd, u_int offset) +{ + return (ahd_inw_scbram(ahd, offset) + | (ahd_inw_scbram(ahd, offset+2) << 16)); +} + +uint64_t +ahd_inq_scbram(struct ahd_softc *ahd, u_int offset) +{ + return (ahd_inl_scbram(ahd, offset) + | ((uint64_t)ahd_inl_scbram(ahd, offset+4)) << 32); +} + +struct scb * +ahd_lookup_scb(struct ahd_softc *ahd, u_int tag) +{ + struct scb* scb; + + if (tag >= AHD_SCB_MAX) + return (NULL); + scb = ahd->scb_data.scbindex[tag]; + if (scb != NULL) + ahd_sync_scb(ahd, scb, + BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); + return (scb); +} + +void +ahd_swap_with_next_hscb(struct ahd_softc *ahd, struct scb *scb) +{ + struct hardware_scb *q_hscb; + struct map_node *q_hscb_map; + uint32_t saved_hscb_busaddr; + + /* + * Our queuing method is a bit tricky. The card + * knows in advance which HSCB (by address) to download, + * and we can't disappoint it. To achieve this, the next + * HSCB to download is saved off in ahd->next_queued_hscb. + * When we are called to queue "an arbitrary scb", + * we copy the contents of the incoming HSCB to the one + * the sequencer knows about, swap HSCB pointers and + * finally assign the SCB to the tag indexed location + * in the scb_array. This makes sure that we can still + * locate the correct SCB by SCB_TAG. + */ + q_hscb = ahd->next_queued_hscb; + q_hscb_map = ahd->next_queued_hscb_map; + saved_hscb_busaddr = q_hscb->hscb_busaddr; + memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb)); + q_hscb->hscb_busaddr = saved_hscb_busaddr; + q_hscb->next_hscb_busaddr = scb->hscb->hscb_busaddr; + + /* Now swap HSCB pointers. */ + ahd->next_queued_hscb = scb->hscb; + ahd->next_queued_hscb_map = scb->hscb_map; + scb->hscb = q_hscb; + scb->hscb_map = q_hscb_map; + + /* Now define the mapping from tag to SCB in the scbindex */ + ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = scb; +} + +/* + * Tell the sequencer about a new transaction to execute. + */ +void +ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb) +{ + ahd_swap_with_next_hscb(ahd, scb); + + if (SCBID_IS_NULL(SCB_GET_TAG(scb))) + panic("Attempt to queue invalid SCB tag %x\n", + SCB_GET_TAG(scb)); + + /* + * Keep a history of SCBs we've downloaded in the qinfifo. + */ + ahd->qinfifo[AHD_QIN_WRAP(ahd->qinfifonext)] = SCB_GET_TAG(scb); + ahd->qinfifonext++; + + if (scb->sg_count != 0) + ahd_setup_data_scb(ahd, scb); + else + ahd_setup_noxfer_scb(ahd, scb); + ahd_setup_scb_common(ahd, scb); + + /* + * Make sure our data is consistent from the + * perspective of the adapter. + */ + ahd_sync_scb(ahd, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); + +#ifdef AHD_DEBUG + if ((ahd_debug & AHD_SHOW_QUEUE) != 0) { + uint64_t host_dataptr; + + host_dataptr = ahd_le64toh(scb->hscb->dataptr); + printf("%s: Queueing SCB %d:0x%x bus addr 0x%x - 0x%x%x/0x%x\n", + ahd_name(ahd), + SCB_GET_TAG(scb), scb->hscb->scsiid, + ahd_le32toh(scb->hscb->hscb_busaddr), + (u_int)((host_dataptr >> 32) & 0xFFFFFFFF), + (u_int)(host_dataptr & 0xFFFFFFFF), + ahd_le32toh(scb->hscb->datacnt)); + } +#endif + /* Tell the adapter about the newly queued SCB */ + ahd_set_hnscb_qoff(ahd, ahd->qinfifonext); +} + +/************************** Interrupt Processing ******************************/ +void +ahd_sync_qoutfifo(struct ahd_softc *ahd, int op) +{ + ahd_dmamap_sync(ahd, ahd->shared_data_dmat, ahd->shared_data_map.dmamap, + /*offset*/0, + /*len*/AHD_SCB_MAX * sizeof(struct ahd_completion), op); +} + +void +ahd_sync_tqinfifo(struct ahd_softc *ahd, int op) +{ +#ifdef AHD_TARGET_MODE + if ((ahd->flags & AHD_TARGETROLE) != 0) { + ahd_dmamap_sync(ahd, ahd->shared_data_dmat, + ahd->shared_data_map.dmamap, + ahd_targetcmd_offset(ahd, 0), + sizeof(struct target_cmd) * AHD_TMODE_CMDS, + op); + } +#endif +} + +/* + * See if the firmware has posted any completed commands + * into our in-core command complete fifos. + */ +#define AHD_RUN_QOUTFIFO 0x1 +#define AHD_RUN_TQINFIFO 0x2 +u_int +ahd_check_cmdcmpltqueues(struct ahd_softc *ahd) +{ + u_int retval; + + retval = 0; + ahd_dmamap_sync(ahd, ahd->shared_data_dmat, ahd->shared_data_map.dmamap, + /*offset*/ahd->qoutfifonext * sizeof(*ahd->qoutfifo), + /*len*/sizeof(*ahd->qoutfifo), BUS_DMASYNC_POSTREAD); + if (ahd->qoutfifo[ahd->qoutfifonext].valid_tag + == ahd->qoutfifonext_valid_tag) + retval |= AHD_RUN_QOUTFIFO; +#ifdef AHD_TARGET_MODE + if ((ahd->flags & AHD_TARGETROLE) != 0 + && (ahd->flags & AHD_TQINFIFO_BLOCKED) == 0) { + ahd_dmamap_sync(ahd, ahd->shared_data_dmat, + ahd->shared_data_map.dmamap, + ahd_targetcmd_offset(ahd, ahd->tqinfifofnext), + /*len*/sizeof(struct target_cmd), + BUS_DMASYNC_POSTREAD); + if (ahd->targetcmds[ahd->tqinfifonext].cmd_valid != 0) + retval |= AHD_RUN_TQINFIFO; + } +#endif + return (retval); +} + +/* + * Catch an interrupt from the adapter + */ +int +ahd_intr(struct ahd_softc *ahd) +{ + u_int intstat; + + if ((ahd->pause & INTEN) == 0) { + /* + * Our interrupt is not enabled on the chip + * and may be disabled for re-entrancy reasons, + * so just return. This is likely just a shared + * interrupt. + */ + return (0); + } + + /* + * Instead of directly reading the interrupt status register, + * infer the cause of the interrupt by checking our in-core + * completion queues. This avoids a costly PCI bus read in + * most cases. + */ + if ((ahd->flags & AHD_ALL_INTERRUPTS) == 0 + && (ahd_check_cmdcmpltqueues(ahd) != 0)) + intstat = CMDCMPLT; + else + intstat = ahd_inb(ahd, INTSTAT); + + if ((intstat & INT_PEND) == 0) + return (0); + + if (intstat & CMDCMPLT) { + ahd_outb(ahd, CLRINT, CLRCMDINT); + + /* + * Ensure that the chip sees that we've cleared + * this interrupt before we walk the output fifo. + * Otherwise, we may, due to posted bus writes, + * clear the interrupt after we finish the scan, + * and after the sequencer has added new entries + * and asserted the interrupt again. + */ + if ((ahd->bugs & AHD_INTCOLLISION_BUG) != 0) { + if (ahd_is_paused(ahd)) { + /* + * Potentially lost SEQINT. + * If SEQINTCODE is non-zero, + * simulate the SEQINT. + */ + if (ahd_inb(ahd, SEQINTCODE) != NO_SEQINT) + intstat |= SEQINT; + } + } else { + ahd_flush_device_writes(ahd); + } + ahd_run_qoutfifo(ahd); + ahd->cmdcmplt_counts[ahd->cmdcmplt_bucket]++; + ahd->cmdcmplt_total++; +#ifdef AHD_TARGET_MODE + if ((ahd->flags & AHD_TARGETROLE) != 0) + ahd_run_tqinfifo(ahd, /*paused*/FALSE); +#endif + } + + /* + * Handle statuses that may invalidate our cached + * copy of INTSTAT separately. + */ + if (intstat == 0xFF && (ahd->features & AHD_REMOVABLE) != 0) { + /* Hot eject. Do nothing */ + } else if (intstat & HWERRINT) { + ahd_handle_hwerrint(ahd); + } else if ((intstat & (PCIINT|SPLTINT)) != 0) { + ahd->bus_intr(ahd); + } else { + + if ((intstat & SEQINT) != 0) + ahd_handle_seqint(ahd, intstat); + + if ((intstat & SCSIINT) != 0) + ahd_handle_scsiint(ahd, intstat); + } + return (1); +} + +/******************************** Private Inlines *****************************/ static __inline void ahd_assert_atn(struct ahd_softc *ahd) { @@ -280,7 +1024,7 @@ ahd_assert_atn(struct ahd_softc *ahd) * are currently in a packetized transfer. We could * just as easily be sending or receiving a message. */ -static __inline int +static int ahd_currently_packetized(struct ahd_softc *ahd) { ahd_mode_state saved_modes; @@ -6272,6 +7016,24 @@ static const char *termstat_strings[] = "Not Configured" }; +/***************************** Timer Facilities *******************************/ +#define ahd_timer_init init_timer +#define ahd_timer_stop del_timer_sync +typedef void ahd_linux_callback_t (u_long); + +static void +ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg) +{ + struct ahd_softc *ahd; + + ahd = (struct ahd_softc *)arg; + del_timer(timer); + timer->data = (u_long)arg; + timer->expires = jiffies + (usec * HZ)/1000000; + timer->function = (ahd_linux_callback_t*)func; + add_timer(timer); +} + /* * Start the board, ready for normal operation */ diff -urpN linux-2.6.23/drivers/scsi/aic7xxx/aic79xx_inline.h linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_inline.h --- linux-2.6.23/drivers/scsi/aic7xxx/aic79xx_inline.h 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_inline.h 2007-10-14 15:02:44.000000000 +0100 @@ -63,18 +63,19 @@ static __inline ahd_mode_state ahd_build static __inline void ahd_extract_mode_state(struct ahd_softc *ahd, ahd_mode_state state, ahd_mode *src, ahd_mode *dst); -static __inline void ahd_set_modes(struct ahd_softc *ahd, ahd_mode src, - ahd_mode dst); -static __inline void ahd_update_modes(struct ahd_softc *ahd); -static __inline void ahd_assert_modes(struct ahd_softc *ahd, ahd_mode srcmode, - ahd_mode dstmode, const char *file, - int line); -static __inline ahd_mode_state ahd_save_modes(struct ahd_softc *ahd); -static __inline void ahd_restore_modes(struct ahd_softc *ahd, - ahd_mode_state state); -static __inline int ahd_is_paused(struct ahd_softc *ahd); -static __inline void ahd_pause(struct ahd_softc *ahd); -static __inline void ahd_unpause(struct ahd_softc *ahd); + +void ahd_set_modes(struct ahd_softc *ahd, ahd_mode src, + ahd_mode dst); +void ahd_update_modes(struct ahd_softc *ahd); +void ahd_assert_modes(struct ahd_softc *ahd, ahd_mode srcmode, + ahd_mode dstmode, const char *file, + int line); +ahd_mode_state ahd_save_modes(struct ahd_softc *ahd); +void ahd_restore_modes(struct ahd_softc *ahd, + ahd_mode_state state); +int ahd_is_paused(struct ahd_softc *ahd); +void ahd_pause(struct ahd_softc *ahd); +void ahd_unpause(struct ahd_softc *ahd); static __inline void ahd_known_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) @@ -99,256 +100,37 @@ ahd_extract_mode_state(struct ahd_softc *dst = (state & DST_MODE) >> DST_MODE_SHIFT; } -static __inline void -ahd_set_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) -{ - if (ahd->src_mode == src && ahd->dst_mode == dst) - return; -#ifdef AHD_DEBUG - if (ahd->src_mode == AHD_MODE_UNKNOWN - || ahd->dst_mode == AHD_MODE_UNKNOWN) - panic("Setting mode prior to saving it.\n"); - if ((ahd_debug & AHD_SHOW_MODEPTR) != 0) - printf("%s: Setting mode 0x%x\n", ahd_name(ahd), - ahd_build_mode_state(ahd, src, dst)); -#endif - ahd_outb(ahd, MODE_PTR, ahd_build_mode_state(ahd, src, dst)); - ahd->src_mode = src; - ahd->dst_mode = dst; -} - -static __inline void -ahd_update_modes(struct ahd_softc *ahd) -{ - ahd_mode_state mode_ptr; - ahd_mode src; - ahd_mode dst; - - mode_ptr = ahd_inb(ahd, MODE_PTR); -#ifdef AHD_DEBUG - if ((ahd_debug & AHD_SHOW_MODEPTR) != 0) - printf("Reading mode 0x%x\n", mode_ptr); -#endif - ahd_extract_mode_state(ahd, mode_ptr, &src, &dst); - ahd_known_modes(ahd, src, dst); -} - -static __inline void -ahd_assert_modes(struct ahd_softc *ahd, ahd_mode srcmode, - ahd_mode dstmode, const char *file, int line) -{ -#ifdef AHD_DEBUG - if ((srcmode & AHD_MK_MSK(ahd->src_mode)) == 0 - || (dstmode & AHD_MK_MSK(ahd->dst_mode)) == 0) { - panic("%s:%s:%d: Mode assertion failed.\n", - ahd_name(ahd), file, line); - } -#endif -} - -static __inline ahd_mode_state -ahd_save_modes(struct ahd_softc *ahd) -{ - if (ahd->src_mode == AHD_MODE_UNKNOWN - || ahd->dst_mode == AHD_MODE_UNKNOWN) - ahd_update_modes(ahd); - - return (ahd_build_mode_state(ahd, ahd->src_mode, ahd->dst_mode)); -} - -static __inline void -ahd_restore_modes(struct ahd_softc *ahd, ahd_mode_state state) -{ - ahd_mode src; - ahd_mode dst; - - ahd_extract_mode_state(ahd, state, &src, &dst); - ahd_set_modes(ahd, src, dst); -} - -#define AHD_ASSERT_MODES(ahd, source, dest) \ - ahd_assert_modes(ahd, source, dest, __FILE__, __LINE__); - -/* - * Determine whether the sequencer has halted code execution. - * Returns non-zero status if the sequencer is stopped. - */ -static __inline int -ahd_is_paused(struct ahd_softc *ahd) -{ - return ((ahd_inb(ahd, HCNTRL) & PAUSE) != 0); -} - -/* - * Request that the sequencer stop and wait, indefinitely, for it - * to stop. The sequencer will only acknowledge that it is paused - * once it has reached an instruction boundary and PAUSEDIS is - * cleared in the SEQCTL register. The sequencer may use PAUSEDIS - * for critical sections. - */ -static __inline void -ahd_pause(struct ahd_softc *ahd) -{ - ahd_outb(ahd, HCNTRL, ahd->pause); - - /* - * Since the sequencer can disable pausing in a critical section, we - * must loop until it actually stops. - */ - while (ahd_is_paused(ahd) == 0) - ; -} - -/* - * Allow the sequencer to continue program execution. - * We check here to ensure that no additional interrupt - * sources that would cause the sequencer to halt have been - * asserted. If, for example, a SCSI bus reset is detected - * while we are fielding a different, pausing, interrupt type, - * we don't want to release the sequencer before going back - * into our interrupt handler and dealing with this new - * condition. - */ -static __inline void -ahd_unpause(struct ahd_softc *ahd) -{ - /* - * Automatically restore our modes to those saved - * prior to the first change of the mode. - */ - if (ahd->saved_src_mode != AHD_MODE_UNKNOWN - && ahd->saved_dst_mode != AHD_MODE_UNKNOWN) { - if ((ahd->flags & AHD_UPDATE_PEND_CMDS) != 0) - ahd_reset_cmds_pending(ahd); - ahd_set_modes(ahd, ahd->saved_src_mode, ahd->saved_dst_mode); - } - - if ((ahd_inb(ahd, INTSTAT) & ~CMDCMPLT) == 0) - ahd_outb(ahd, HCNTRL, ahd->unpause); - - ahd_known_modes(ahd, AHD_MODE_UNKNOWN, AHD_MODE_UNKNOWN); -} - /*********************** Scatter Gather List Handling *************************/ -static __inline void *ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb, - void *sgptr, dma_addr_t addr, - bus_size_t len, int last); -static __inline void ahd_setup_scb_common(struct ahd_softc *ahd, - struct scb *scb); -static __inline void ahd_setup_data_scb(struct ahd_softc *ahd, - struct scb *scb); -static __inline void ahd_setup_noxfer_scb(struct ahd_softc *ahd, - struct scb *scb); - -static __inline void * -ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb, - void *sgptr, dma_addr_t addr, bus_size_t len, int last) -{ - scb->sg_count++; - if (sizeof(dma_addr_t) > 4 - && (ahd->flags & AHD_64BIT_ADDRESSING) != 0) { - struct ahd_dma64_seg *sg; - - sg = (struct ahd_dma64_seg *)sgptr; - sg->addr = ahd_htole64(addr); - sg->len = ahd_htole32(len | (last ? AHD_DMA_LAST_SEG : 0)); - return (sg + 1); - } else { - struct ahd_dma_seg *sg; - - sg = (struct ahd_dma_seg *)sgptr; - sg->addr = ahd_htole32(addr & 0xFFFFFFFF); - sg->len = ahd_htole32(len | ((addr >> 8) & 0x7F000000) - | (last ? AHD_DMA_LAST_SEG : 0)); - return (sg + 1); - } -} - -static __inline void -ahd_setup_scb_common(struct ahd_softc *ahd, struct scb *scb) -{ - /* XXX Handle target mode SCBs. */ - scb->crc_retry_count = 0; - if ((scb->flags & SCB_PACKETIZED) != 0) { - /* XXX what about ACA?? It is type 4, but TAG_TYPE == 0x3. */ - scb->hscb->task_attribute = scb->hscb->control & SCB_TAG_TYPE; - } else { - if (ahd_get_transfer_length(scb) & 0x01) - scb->hscb->task_attribute = SCB_XFERLEN_ODD; - else - scb->hscb->task_attribute = 0; - } - - if (scb->hscb->cdb_len <= MAX_CDB_LEN_WITH_SENSE_ADDR - || (scb->hscb->cdb_len & SCB_CDB_LEN_PTR) != 0) - scb->hscb->shared_data.idata.cdb_plus_saddr.sense_addr = - ahd_htole32(scb->sense_busaddr); -} - -static __inline void -ahd_setup_data_scb(struct ahd_softc *ahd, struct scb *scb) -{ - /* - * Copy the first SG into the "current" data ponter area. - */ - if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) { - struct ahd_dma64_seg *sg; - - sg = (struct ahd_dma64_seg *)scb->sg_list; - scb->hscb->dataptr = sg->addr; - scb->hscb->datacnt = sg->len; - } else { - struct ahd_dma_seg *sg; - uint32_t *dataptr_words; - - sg = (struct ahd_dma_seg *)scb->sg_list; - dataptr_words = (uint32_t*)&scb->hscb->dataptr; - dataptr_words[0] = sg->addr; - dataptr_words[1] = 0; - if ((ahd->flags & AHD_39BIT_ADDRESSING) != 0) { - uint64_t high_addr; - - high_addr = ahd_le32toh(sg->len) & 0x7F000000; - scb->hscb->dataptr |= ahd_htole64(high_addr << 8); - } - scb->hscb->datacnt = sg->len; - } - /* - * Note where to find the SG entries in bus space. - * We also set the full residual flag which the - * sequencer will clear as soon as a data transfer - * occurs. - */ - scb->hscb->sgptr = ahd_htole32(scb->sg_list_busaddr|SG_FULL_RESID); -} - -static __inline void -ahd_setup_noxfer_scb(struct ahd_softc *ahd, struct scb *scb) -{ - scb->hscb->sgptr = ahd_htole32(SG_LIST_NULL); - scb->hscb->dataptr = 0; - scb->hscb->datacnt = 0; -} +void *ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb, + void *sgptr, dma_addr_t addr, + bus_size_t len, int last); +void ahd_setup_scb_common(struct ahd_softc *ahd, + struct scb *scb); +void ahd_setup_data_scb(struct ahd_softc *ahd, + struct scb *scb); +void ahd_setup_noxfer_scb(struct ahd_softc *ahd, + struct scb *scb); /************************** Memory mapping routines ***************************/ static __inline size_t ahd_sg_size(struct ahd_softc *ahd); -static __inline void * - ahd_sg_bus_to_virt(struct ahd_softc *ahd, - struct scb *scb, - uint32_t sg_busaddr); -static __inline uint32_t - ahd_sg_virt_to_bus(struct ahd_softc *ahd, - struct scb *scb, - void *sg); -static __inline void ahd_sync_scb(struct ahd_softc *ahd, - struct scb *scb, int op); -static __inline void ahd_sync_sglist(struct ahd_softc *ahd, - struct scb *scb, int op); -static __inline void ahd_sync_sense(struct ahd_softc *ahd, - struct scb *scb, int op); -static __inline uint32_t - ahd_targetcmd_offset(struct ahd_softc *ahd, - u_int index); + +void * + ahd_sg_bus_to_virt(struct ahd_softc *ahd, + struct scb *scb, + uint32_t sg_busaddr); +uint32_t + ahd_sg_virt_to_bus(struct ahd_softc *ahd, + struct scb *scb, + void *sg); +void ahd_sync_scb(struct ahd_softc *ahd, + struct scb *scb, int op); +void ahd_sync_sglist(struct ahd_softc *ahd, + struct scb *scb, int op); +void ahd_sync_sense(struct ahd_softc *ahd, + struct scb *scb, int op); +uint32_t + ahd_targetcmd_offset(struct ahd_softc *ahd, + u_int index); static __inline size_t ahd_sg_size(struct ahd_softc *ahd) @@ -358,104 +140,48 @@ ahd_sg_size(struct ahd_softc *ahd) return (sizeof(struct ahd_dma_seg)); } -static __inline void * -ahd_sg_bus_to_virt(struct ahd_softc *ahd, struct scb *scb, uint32_t sg_busaddr) -{ - dma_addr_t sg_offset; - - /* sg_list_phys points to entry 1, not 0 */ - sg_offset = sg_busaddr - (scb->sg_list_busaddr - ahd_sg_size(ahd)); - return ((uint8_t *)scb->sg_list + sg_offset); -} - -static __inline uint32_t -ahd_sg_virt_to_bus(struct ahd_softc *ahd, struct scb *scb, void *sg) -{ - dma_addr_t sg_offset; - - /* sg_list_phys points to entry 1, not 0 */ - sg_offset = ((uint8_t *)sg - (uint8_t *)scb->sg_list) - - ahd_sg_size(ahd); - - return (scb->sg_list_busaddr + sg_offset); -} - -static __inline void -ahd_sync_scb(struct ahd_softc *ahd, struct scb *scb, int op) -{ - ahd_dmamap_sync(ahd, ahd->scb_data.hscb_dmat, - scb->hscb_map->dmamap, - /*offset*/(uint8_t*)scb->hscb - scb->hscb_map->vaddr, - /*len*/sizeof(*scb->hscb), op); -} - -static __inline void -ahd_sync_sglist(struct ahd_softc *ahd, struct scb *scb, int op) -{ - if (scb->sg_count == 0) - return; - - ahd_dmamap_sync(ahd, ahd->scb_data.sg_dmat, - scb->sg_map->dmamap, - /*offset*/scb->sg_list_busaddr - ahd_sg_size(ahd), - /*len*/ahd_sg_size(ahd) * scb->sg_count, op); -} - -static __inline void -ahd_sync_sense(struct ahd_softc *ahd, struct scb *scb, int op) -{ - ahd_dmamap_sync(ahd, ahd->scb_data.sense_dmat, - scb->sense_map->dmamap, - /*offset*/scb->sense_busaddr, - /*len*/AHD_SENSE_BUFSIZE, op); -} - -static __inline uint32_t -ahd_targetcmd_offset(struct ahd_softc *ahd, u_int index) -{ - return (((uint8_t *)&ahd->targetcmds[index]) - - (uint8_t *)ahd->qoutfifo); -} - /*********************** Miscelaneous Support Functions ***********************/ -static __inline struct ahd_initiator_tinfo * - ahd_fetch_transinfo(struct ahd_softc *ahd, - char channel, u_int our_id, - u_int remote_id, - struct ahd_tmode_tstate **tstate); -static __inline uint16_t - ahd_inw(struct ahd_softc *ahd, u_int port); -static __inline void ahd_outw(struct ahd_softc *ahd, u_int port, - u_int value); -static __inline uint32_t - ahd_inl(struct ahd_softc *ahd, u_int port); -static __inline void ahd_outl(struct ahd_softc *ahd, u_int port, - uint32_t value); -static __inline uint64_t - ahd_inq(struct ahd_softc *ahd, u_int port); -static __inline void ahd_outq(struct ahd_softc *ahd, u_int port, - uint64_t value); -static __inline u_int ahd_get_scbptr(struct ahd_softc *ahd); -static __inline void ahd_set_scbptr(struct ahd_softc *ahd, u_int scbptr); -static __inline u_int ahd_get_hnscb_qoff(struct ahd_softc *ahd); -static __inline void ahd_set_hnscb_qoff(struct ahd_softc *ahd, u_int value); -static __inline u_int ahd_get_hescb_qoff(struct ahd_softc *ahd); -static __inline void ahd_set_hescb_qoff(struct ahd_softc *ahd, u_int value); -static __inline u_int ahd_get_snscb_qoff(struct ahd_softc *ahd); -static __inline void ahd_set_snscb_qoff(struct ahd_softc *ahd, u_int value); -static __inline u_int ahd_get_sescb_qoff(struct ahd_softc *ahd); -static __inline void ahd_set_sescb_qoff(struct ahd_softc *ahd, u_int value); -static __inline u_int ahd_get_sdscb_qoff(struct ahd_softc *ahd); -static __inline void ahd_set_sdscb_qoff(struct ahd_softc *ahd, u_int value); -static __inline u_int ahd_inb_scbram(struct ahd_softc *ahd, u_int offset); -static __inline u_int ahd_inw_scbram(struct ahd_softc *ahd, u_int offset); -static __inline uint32_t - ahd_inl_scbram(struct ahd_softc *ahd, u_int offset); -static __inline uint64_t - ahd_inq_scbram(struct ahd_softc *ahd, u_int offset); -static __inline void ahd_swap_with_next_hscb(struct ahd_softc *ahd, - struct scb *scb); -static __inline void ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb); +struct ahd_initiator_tinfo * + ahd_fetch_transinfo(struct ahd_softc *ahd, + char channel, u_int our_id, + u_int remote_id, + struct ahd_tmode_tstate **tstate); +uint16_t + ahd_inw(struct ahd_softc *ahd, u_int port); +void ahd_outw(struct ahd_softc *ahd, u_int port, + u_int value); +uint32_t + ahd_inl(struct ahd_softc *ahd, u_int port); +void ahd_outl(struct ahd_softc *ahd, u_int port, + uint32_t value); +uint64_t + ahd_inq(struct ahd_softc *ahd, u_int port); +void ahd_outq(struct ahd_softc *ahd, u_int port, + uint64_t value); +u_int ahd_get_scbptr(struct ahd_softc *ahd); +void ahd_set_scbptr(struct ahd_softc *ahd, u_int scbptr); +u_int ahd_get_hnscb_qoff(struct ahd_softc *ahd); +void ahd_set_hnscb_qoff(struct ahd_softc *ahd, u_int value); +u_int ahd_get_hescb_qoff(struct ahd_softc *ahd); +void ahd_set_hescb_qoff(struct ahd_softc *ahd, u_int value); +u_int ahd_get_snscb_qoff(struct ahd_softc *ahd); +void ahd_set_snscb_qoff(struct ahd_softc *ahd, u_int value); +u_int ahd_get_sescb_qoff(struct ahd_softc *ahd); +void ahd_set_sescb_qoff(struct ahd_softc *ahd, u_int value); +u_int ahd_get_sdscb_qoff(struct ahd_softc *ahd); +void ahd_set_sdscb_qoff(struct ahd_softc *ahd, u_int value); +u_int ahd_inb_scbram(struct ahd_softc *ahd, u_int offset); +u_int ahd_inw_scbram(struct ahd_softc *ahd, u_int offset); +uint32_t + ahd_inl_scbram(struct ahd_softc *ahd, u_int offset); +uint64_t + ahd_inq_scbram(struct ahd_softc *ahd, u_int offset); +struct scb * + ahd_lookup_scb(struct ahd_softc *ahd, u_int tag); +void ahd_swap_with_next_hscb(struct ahd_softc *ahd, + struct scb *scb); +void ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb); + static __inline uint8_t * ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb); @@ -463,25 +189,7 @@ static __inline uint32_t ahd_get_sense_bufaddr(struct ahd_softc *ahd, struct scb *scb); -/* - * Return pointers to the transfer negotiation information - * for the specified our_id/remote_id pair. - */ -static __inline struct ahd_initiator_tinfo * -ahd_fetch_transinfo(struct ahd_softc *ahd, char channel, u_int our_id, - u_int remote_id, struct ahd_tmode_tstate **tstate) -{ - /* - * Transfer data structures are stored from the perspective - * of the target role. Since the parameters for a connection - * in the initiator role to a given target are the same as - * when the roles are reversed, we pretend we are the target. - */ - if (channel == 'B') - our_id += 8; - *tstate = ahd->enabled_targets[our_id]; - return (&(*tstate)->transinfo[remote_id]); -} +#if 0 /* unused */ #define AHD_COPY_COL_IDX(dst, src) \ do { \ @@ -489,304 +197,7 @@ do { \ dst->hscb->lun = src->hscb->lun; \ } while (0) -static __inline uint16_t -ahd_inw(struct ahd_softc *ahd, u_int port) -{ - /* - * Read high byte first as some registers increment - * or have other side effects when the low byte is - * read. - */ - uint16_t r = ahd_inb(ahd, port+1) << 8; - return r | ahd_inb(ahd, port); -} - -static __inline void -ahd_outw(struct ahd_softc *ahd, u_int port, u_int value) -{ - /* - * Write low byte first to accomodate registers - * such as PRGMCNT where the order maters. - */ - ahd_outb(ahd, port, value & 0xFF); - ahd_outb(ahd, port+1, (value >> 8) & 0xFF); -} - -static __inline uint32_t -ahd_inl(struct ahd_softc *ahd, u_int port) -{ - return ((ahd_inb(ahd, port)) - | (ahd_inb(ahd, port+1) << 8) - | (ahd_inb(ahd, port+2) << 16) - | (ahd_inb(ahd, port+3) << 24)); -} - -static __inline void -ahd_outl(struct ahd_softc *ahd, u_int port, uint32_t value) -{ - ahd_outb(ahd, port, (value) & 0xFF); - ahd_outb(ahd, port+1, ((value) >> 8) & 0xFF); - ahd_outb(ahd, port+2, ((value) >> 16) & 0xFF); - ahd_outb(ahd, port+3, ((value) >> 24) & 0xFF); -} - -static __inline uint64_t -ahd_inq(struct ahd_softc *ahd, u_int port) -{ - return ((ahd_inb(ahd, port)) - | (ahd_inb(ahd, port+1) << 8) - | (ahd_inb(ahd, port+2) << 16) - | (ahd_inb(ahd, port+3) << 24) - | (((uint64_t)ahd_inb(ahd, port+4)) << 32) - | (((uint64_t)ahd_inb(ahd, port+5)) << 40) - | (((uint64_t)ahd_inb(ahd, port+6)) << 48) - | (((uint64_t)ahd_inb(ahd, port+7)) << 56)); -} - -static __inline void -ahd_outq(struct ahd_softc *ahd, u_int port, uint64_t value) -{ - ahd_outb(ahd, port, value & 0xFF); - ahd_outb(ahd, port+1, (value >> 8) & 0xFF); - ahd_outb(ahd, port+2, (value >> 16) & 0xFF); - ahd_outb(ahd, port+3, (value >> 24) & 0xFF); - ahd_outb(ahd, port+4, (value >> 32) & 0xFF); - ahd_outb(ahd, port+5, (value >> 40) & 0xFF); - ahd_outb(ahd, port+6, (value >> 48) & 0xFF); - ahd_outb(ahd, port+7, (value >> 56) & 0xFF); -} - -static __inline u_int -ahd_get_scbptr(struct ahd_softc *ahd) -{ - AHD_ASSERT_MODES(ahd, ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK), - ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK)); - return (ahd_inb(ahd, SCBPTR) | (ahd_inb(ahd, SCBPTR + 1) << 8)); -} - -static __inline void -ahd_set_scbptr(struct ahd_softc *ahd, u_int scbptr) -{ - AHD_ASSERT_MODES(ahd, ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK), - ~(AHD_MODE_UNKNOWN_MSK|AHD_MODE_CFG_MSK)); - ahd_outb(ahd, SCBPTR, scbptr & 0xFF); - ahd_outb(ahd, SCBPTR+1, (scbptr >> 8) & 0xFF); -} - -static __inline u_int -ahd_get_hnscb_qoff(struct ahd_softc *ahd) -{ - return (ahd_inw_atomic(ahd, HNSCB_QOFF)); -} - -static __inline void -ahd_set_hnscb_qoff(struct ahd_softc *ahd, u_int value) -{ - ahd_outw_atomic(ahd, HNSCB_QOFF, value); -} - -static __inline u_int -ahd_get_hescb_qoff(struct ahd_softc *ahd) -{ - return (ahd_inb(ahd, HESCB_QOFF)); -} - -static __inline void -ahd_set_hescb_qoff(struct ahd_softc *ahd, u_int value) -{ - ahd_outb(ahd, HESCB_QOFF, value); -} - -static __inline u_int -ahd_get_snscb_qoff(struct ahd_softc *ahd) -{ - u_int oldvalue; - - AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); - oldvalue = ahd_inw(ahd, SNSCB_QOFF); - ahd_outw(ahd, SNSCB_QOFF, oldvalue); - return (oldvalue); -} - -static __inline void -ahd_set_snscb_qoff(struct ahd_softc *ahd, u_int value) -{ - AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); - ahd_outw(ahd, SNSCB_QOFF, value); -} - -static __inline u_int -ahd_get_sescb_qoff(struct ahd_softc *ahd) -{ - AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); - return (ahd_inb(ahd, SESCB_QOFF)); -} - -static __inline void -ahd_set_sescb_qoff(struct ahd_softc *ahd, u_int value) -{ - AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); - ahd_outb(ahd, SESCB_QOFF, value); -} - -static __inline u_int -ahd_get_sdscb_qoff(struct ahd_softc *ahd) -{ - AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); - return (ahd_inb(ahd, SDSCB_QOFF) | (ahd_inb(ahd, SDSCB_QOFF + 1) << 8)); -} - -static __inline void -ahd_set_sdscb_qoff(struct ahd_softc *ahd, u_int value) -{ - AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); - ahd_outb(ahd, SDSCB_QOFF, value & 0xFF); - ahd_outb(ahd, SDSCB_QOFF+1, (value >> 8) & 0xFF); -} - -static __inline u_int -ahd_inb_scbram(struct ahd_softc *ahd, u_int offset) -{ - u_int value; - - /* - * Workaround PCI-X Rev A. hardware bug. - * After a host read of SCB memory, the chip - * may become confused into thinking prefetch - * was required. This starts the discard timer - * running and can cause an unexpected discard - * timer interrupt. The work around is to read - * a normal register prior to the exhaustion of - * the discard timer. The mode pointer register - * has no side effects and so serves well for - * this purpose. - * - * Razor #528 - */ - value = ahd_inb(ahd, offset); - if ((ahd->bugs & AHD_PCIX_SCBRAM_RD_BUG) != 0) - ahd_inb(ahd, MODE_PTR); - return (value); -} - -static __inline u_int -ahd_inw_scbram(struct ahd_softc *ahd, u_int offset) -{ - return (ahd_inb_scbram(ahd, offset) - | (ahd_inb_scbram(ahd, offset+1) << 8)); -} - -static __inline uint32_t -ahd_inl_scbram(struct ahd_softc *ahd, u_int offset) -{ - return (ahd_inw_scbram(ahd, offset) - | (ahd_inw_scbram(ahd, offset+2) << 16)); -} - -static __inline uint64_t -ahd_inq_scbram(struct ahd_softc *ahd, u_int offset) -{ - return (ahd_inl_scbram(ahd, offset) - | ((uint64_t)ahd_inl_scbram(ahd, offset+4)) << 32); -} - -static __inline struct scb * -ahd_lookup_scb(struct ahd_softc *ahd, u_int tag) -{ - struct scb* scb; - - if (tag >= AHD_SCB_MAX) - return (NULL); - scb = ahd->scb_data.scbindex[tag]; - if (scb != NULL) - ahd_sync_scb(ahd, scb, - BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); - return (scb); -} - -static __inline void -ahd_swap_with_next_hscb(struct ahd_softc *ahd, struct scb *scb) -{ - struct hardware_scb *q_hscb; - struct map_node *q_hscb_map; - uint32_t saved_hscb_busaddr; - - /* - * Our queuing method is a bit tricky. The card - * knows in advance which HSCB (by address) to download, - * and we can't disappoint it. To achieve this, the next - * HSCB to download is saved off in ahd->next_queued_hscb. - * When we are called to queue "an arbitrary scb", - * we copy the contents of the incoming HSCB to the one - * the sequencer knows about, swap HSCB pointers and - * finally assign the SCB to the tag indexed location - * in the scb_array. This makes sure that we can still - * locate the correct SCB by SCB_TAG. - */ - q_hscb = ahd->next_queued_hscb; - q_hscb_map = ahd->next_queued_hscb_map; - saved_hscb_busaddr = q_hscb->hscb_busaddr; - memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb)); - q_hscb->hscb_busaddr = saved_hscb_busaddr; - q_hscb->next_hscb_busaddr = scb->hscb->hscb_busaddr; - - /* Now swap HSCB pointers. */ - ahd->next_queued_hscb = scb->hscb; - ahd->next_queued_hscb_map = scb->hscb_map; - scb->hscb = q_hscb; - scb->hscb_map = q_hscb_map; - - /* Now define the mapping from tag to SCB in the scbindex */ - ahd->scb_data.scbindex[SCB_GET_TAG(scb)] = scb; -} - -/* - * Tell the sequencer about a new transaction to execute. - */ -static __inline void -ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb) -{ - ahd_swap_with_next_hscb(ahd, scb); - - if (SCBID_IS_NULL(SCB_GET_TAG(scb))) - panic("Attempt to queue invalid SCB tag %x\n", - SCB_GET_TAG(scb)); - - /* - * Keep a history of SCBs we've downloaded in the qinfifo. - */ - ahd->qinfifo[AHD_QIN_WRAP(ahd->qinfifonext)] = SCB_GET_TAG(scb); - ahd->qinfifonext++; - - if (scb->sg_count != 0) - ahd_setup_data_scb(ahd, scb); - else - ahd_setup_noxfer_scb(ahd, scb); - ahd_setup_scb_common(ahd, scb); - - /* - * Make sure our data is consistent from the - * perspective of the adapter. - */ - ahd_sync_scb(ahd, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); - -#ifdef AHD_DEBUG - if ((ahd_debug & AHD_SHOW_QUEUE) != 0) { - uint64_t host_dataptr; - - host_dataptr = ahd_le64toh(scb->hscb->dataptr); - printf("%s: Queueing SCB %d:0x%x bus addr 0x%x - 0x%x%x/0x%x\n", - ahd_name(ahd), - SCB_GET_TAG(scb), scb->hscb->scsiid, - ahd_le32toh(scb->hscb->hscb_busaddr), - (u_int)((host_dataptr >> 32) & 0xFFFFFFFF), - (u_int)(host_dataptr & 0xFFFFFFFF), - ahd_le32toh(scb->hscb->datacnt)); - } #endif - /* Tell the adapter about the newly queued SCB */ - ahd_set_hnscb_qoff(ahd, ahd->qinfifonext); -} static __inline uint8_t * ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb) @@ -801,151 +212,9 @@ ahd_get_sense_bufaddr(struct ahd_softc * } /************************** Interrupt Processing ******************************/ -static __inline void ahd_sync_qoutfifo(struct ahd_softc *ahd, int op); -static __inline void ahd_sync_tqinfifo(struct ahd_softc *ahd, int op); -static __inline u_int ahd_check_cmdcmpltqueues(struct ahd_softc *ahd); -static __inline int ahd_intr(struct ahd_softc *ahd); - -static __inline void -ahd_sync_qoutfifo(struct ahd_softc *ahd, int op) -{ - ahd_dmamap_sync(ahd, ahd->shared_data_dmat, ahd->shared_data_map.dmamap, - /*offset*/0, - /*len*/AHD_SCB_MAX * sizeof(struct ahd_completion), op); -} - -static __inline void -ahd_sync_tqinfifo(struct ahd_softc *ahd, int op) -{ -#ifdef AHD_TARGET_MODE - if ((ahd->flags & AHD_TARGETROLE) != 0) { - ahd_dmamap_sync(ahd, ahd->shared_data_dmat, - ahd->shared_data_map.dmamap, - ahd_targetcmd_offset(ahd, 0), - sizeof(struct target_cmd) * AHD_TMODE_CMDS, - op); - } -#endif -} - -/* - * See if the firmware has posted any completed commands - * into our in-core command complete fifos. - */ -#define AHD_RUN_QOUTFIFO 0x1 -#define AHD_RUN_TQINFIFO 0x2 -static __inline u_int -ahd_check_cmdcmpltqueues(struct ahd_softc *ahd) -{ - u_int retval; - - retval = 0; - ahd_dmamap_sync(ahd, ahd->shared_data_dmat, ahd->shared_data_map.dmamap, - /*offset*/ahd->qoutfifonext * sizeof(*ahd->qoutfifo), - /*len*/sizeof(*ahd->qoutfifo), BUS_DMASYNC_POSTREAD); - if (ahd->qoutfifo[ahd->qoutfifonext].valid_tag - == ahd->qoutfifonext_valid_tag) - retval |= AHD_RUN_QOUTFIFO; -#ifdef AHD_TARGET_MODE - if ((ahd->flags & AHD_TARGETROLE) != 0 - && (ahd->flags & AHD_TQINFIFO_BLOCKED) == 0) { - ahd_dmamap_sync(ahd, ahd->shared_data_dmat, - ahd->shared_data_map.dmamap, - ahd_targetcmd_offset(ahd, ahd->tqinfifofnext), - /*len*/sizeof(struct target_cmd), - BUS_DMASYNC_POSTREAD); - if (ahd->targetcmds[ahd->tqinfifonext].cmd_valid != 0) - retval |= AHD_RUN_TQINFIFO; - } -#endif - return (retval); -} - -/* - * Catch an interrupt from the adapter - */ -static __inline int -ahd_intr(struct ahd_softc *ahd) -{ - u_int intstat; - - if ((ahd->pause & INTEN) == 0) { - /* - * Our interrupt is not enabled on the chip - * and may be disabled for re-entrancy reasons, - * so just return. This is likely just a shared - * interrupt. - */ - return (0); - } - - /* - * Instead of directly reading the interrupt status register, - * infer the cause of the interrupt by checking our in-core - * completion queues. This avoids a costly PCI bus read in - * most cases. - */ - if ((ahd->flags & AHD_ALL_INTERRUPTS) == 0 - && (ahd_check_cmdcmpltqueues(ahd) != 0)) - intstat = CMDCMPLT; - else - intstat = ahd_inb(ahd, INTSTAT); - - if ((intstat & INT_PEND) == 0) - return (0); - - if (intstat & CMDCMPLT) { - ahd_outb(ahd, CLRINT, CLRCMDINT); - - /* - * Ensure that the chip sees that we've cleared - * this interrupt before we walk the output fifo. - * Otherwise, we may, due to posted bus writes, - * clear the interrupt after we finish the scan, - * and after the sequencer has added new entries - * and asserted the interrupt again. - */ - if ((ahd->bugs & AHD_INTCOLLISION_BUG) != 0) { - if (ahd_is_paused(ahd)) { - /* - * Potentially lost SEQINT. - * If SEQINTCODE is non-zero, - * simulate the SEQINT. - */ - if (ahd_inb(ahd, SEQINTCODE) != NO_SEQINT) - intstat |= SEQINT; - } - } else { - ahd_flush_device_writes(ahd); - } - ahd_run_qoutfifo(ahd); - ahd->cmdcmplt_counts[ahd->cmdcmplt_bucket]++; - ahd->cmdcmplt_total++; -#ifdef AHD_TARGET_MODE - if ((ahd->flags & AHD_TARGETROLE) != 0) - ahd_run_tqinfifo(ahd, /*paused*/FALSE); -#endif - } - - /* - * Handle statuses that may invalidate our cached - * copy of INTSTAT separately. - */ - if (intstat == 0xFF && (ahd->features & AHD_REMOVABLE) != 0) { - /* Hot eject. Do nothing */ - } else if (intstat & HWERRINT) { - ahd_handle_hwerrint(ahd); - } else if ((intstat & (PCIINT|SPLTINT)) != 0) { - ahd->bus_intr(ahd); - } else { - - if ((intstat & SEQINT) != 0) - ahd_handle_seqint(ahd, intstat); - - if ((intstat & SCSIINT) != 0) - ahd_handle_scsiint(ahd, intstat); - } - return (1); -} +void ahd_sync_qoutfifo(struct ahd_softc *ahd, int op); +void ahd_sync_tqinfifo(struct ahd_softc *ahd, int op); +u_int ahd_check_cmdcmpltqueues(struct ahd_softc *ahd); +int ahd_intr(struct ahd_softc *ahd); #endif /* _AIC79XX_INLINE_H_ */ diff -urpN linux-2.6.23/drivers/scsi/aic7xxx/aic79xx_osm.c linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_osm.c --- linux-2.6.23/drivers/scsi/aic7xxx/aic79xx_osm.c 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_osm.c 2007-10-14 15:02:44.000000000 +0100 @@ -369,10 +369,166 @@ static void ahd_release_simq(struct ahd_ static int ahd_linux_unit; +/************************** OS Utility Wrappers *******************************/ +void ahd_delay(long); +void +ahd_delay(long usec) +{ + /* + * udelay on Linux can have problems for + * multi-millisecond waits. Wait at most + * 1024us per call. + */ + while (usec > 0) { + udelay(usec % 1024); + usec -= 1024; + } +} + + +/***************************** Low Level I/O **********************************/ +uint8_t ahd_inb(struct ahd_softc * ahd, long port); +uint16_t ahd_inw_atomic(struct ahd_softc * ahd, long port); +void ahd_outb(struct ahd_softc * ahd, long port, uint8_t val); +void ahd_outw_atomic(struct ahd_softc * ahd, + long port, uint16_t val); +void ahd_outsb(struct ahd_softc * ahd, long port, + uint8_t *, int count); +void ahd_insb(struct ahd_softc * ahd, long port, + uint8_t *, int count); + +uint8_t +ahd_inb(struct ahd_softc * ahd, long port) +{ + uint8_t x; + + if (ahd->tags[0] == BUS_SPACE_MEMIO) { + x = readb(ahd->bshs[0].maddr + port); + } else { + x = inb(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF)); + } + mb(); + return (x); +} + +uint16_t +ahd_inw_atomic(struct ahd_softc * ahd, long port) +{ + uint8_t x; + + if (ahd->tags[0] == BUS_SPACE_MEMIO) { + x = readw(ahd->bshs[0].maddr + port); + } else { + x = inw(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF)); + } + mb(); + return (x); +} + +void +ahd_outb(struct ahd_softc * ahd, long port, uint8_t val) +{ + if (ahd->tags[0] == BUS_SPACE_MEMIO) { + writeb(val, ahd->bshs[0].maddr + port); + } else { + outb(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF)); + } + mb(); +} + +void +ahd_outw_atomic(struct ahd_softc * ahd, long port, uint16_t val) +{ + if (ahd->tags[0] == BUS_SPACE_MEMIO) { + writew(val, ahd->bshs[0].maddr + port); + } else { + outw(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF)); + } + mb(); +} + +void +ahd_outsb(struct ahd_softc * ahd, long port, uint8_t *array, int count) +{ + int i; + + /* + * There is probably a more efficient way to do this on Linux + * but we don't use this for anything speed critical and this + * should work. + */ + for (i = 0; i < count; i++) + ahd_outb(ahd, port, *array++); +} + +void +ahd_insb(struct ahd_softc * ahd, long port, uint8_t *array, int count) +{ + int i; + + /* + * There is probably a more efficient way to do this on Linux + * but we don't use this for anything speed critical and this + * should work. + */ + for (i = 0; i < count; i++) + *array++ = ahd_inb(ahd, port); +} + +/******************************* PCI Routines *********************************/ +uint32_t +ahd_pci_read_config(ahd_dev_softc_t pci, int reg, int width) +{ + switch (width) { + case 1: + { + uint8_t retval; + + pci_read_config_byte(pci, reg, &retval); + return (retval); + } + case 2: + { + uint16_t retval; + pci_read_config_word(pci, reg, &retval); + return (retval); + } + case 4: + { + uint32_t retval; + pci_read_config_dword(pci, reg, &retval); + return (retval); + } + default: + panic("ahd_pci_read_config: Read size too big"); + /* NOTREACHED */ + return (0); + } +} + +void +ahd_pci_write_config(ahd_dev_softc_t pci, int reg, uint32_t value, int width) +{ + switch (width) { + case 1: + pci_write_config_byte(pci, reg, value); + break; + case 2: + pci_write_config_word(pci, reg, value); + break; + case 4: + pci_write_config_dword(pci, reg, value); + break; + default: + panic("ahd_pci_write_config: Write size too big"); + /* NOTREACHED */ + } +} + /****************************** Inlines ***************************************/ -static __inline void ahd_linux_unmap_scb(struct ahd_softc*, struct scb*); +static void ahd_linux_unmap_scb(struct ahd_softc*, struct scb*); -static __inline void +static void ahd_linux_unmap_scb(struct ahd_softc *ahd, struct scb *scb) { struct scsi_cmnd *cmd; @@ -432,7 +588,7 @@ ahd_linux_queue(struct scsi_cmnd * cmd, return rtn; } -static inline struct scsi_target ** +static struct scsi_target ** ahd_linux_target_in_softc(struct scsi_target *starget) { struct ahd_softc *ahd = diff -urpN linux-2.6.23/drivers/scsi/aic7xxx/aic79xx_osm.h linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_osm.h --- linux-2.6.23/drivers/scsi/aic7xxx/aic79xx_osm.h 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_osm.h 2007-10-14 15:02:44.000000000 +0100 @@ -222,22 +222,6 @@ typedef struct timer_list ahd_timer_t; /***************************** Timer Facilities *******************************/ #define ahd_timer_init init_timer #define ahd_timer_stop del_timer_sync -typedef void ahd_linux_callback_t (u_long); -static __inline void ahd_timer_reset(ahd_timer_t *timer, int usec, - ahd_callback_t *func, void *arg); - -static __inline void -ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg) -{ - struct ahd_softc *ahd; - - ahd = (struct ahd_softc *)arg; - del_timer(timer); - timer->data = (u_long)arg; - timer->expires = jiffies + (usec * HZ)/1000000; - timer->function = (ahd_linux_callback_t*)func; - add_timer(timer); -} /***************************** SMP support ************************************/ #include <linux/spinlock.h> @@ -386,111 +370,19 @@ struct ahd_platform_data { #define malloc(size, type, flags) kmalloc(size, flags) #define free(ptr, type) kfree(ptr) -static __inline void ahd_delay(long); -static __inline void -ahd_delay(long usec) -{ - /* - * udelay on Linux can have problems for - * multi-millisecond waits. Wait at most - * 1024us per call. - */ - while (usec > 0) { - udelay(usec % 1024); - usec -= 1024; - } -} - +void ahd_delay(long); /***************************** Low Level I/O **********************************/ -static __inline uint8_t ahd_inb(struct ahd_softc * ahd, long port); -static __inline uint16_t ahd_inw_atomic(struct ahd_softc * ahd, long port); -static __inline void ahd_outb(struct ahd_softc * ahd, long port, uint8_t val); -static __inline void ahd_outw_atomic(struct ahd_softc * ahd, +uint8_t ahd_inb(struct ahd_softc * ahd, long port); +uint16_t ahd_inw_atomic(struct ahd_softc * ahd, long port); +void ahd_outb(struct ahd_softc * ahd, long port, uint8_t val); +void ahd_outw_atomic(struct ahd_softc * ahd, long port, uint16_t val); -static __inline void ahd_outsb(struct ahd_softc * ahd, long port, +void ahd_outsb(struct ahd_softc * ahd, long port, uint8_t *, int count); -static __inline void ahd_insb(struct ahd_softc * ahd, long port, +void ahd_insb(struct ahd_softc * ahd, long port, uint8_t *, int count); -static __inline uint8_t -ahd_inb(struct ahd_softc * ahd, long port) -{ - uint8_t x; - - if (ahd->tags[0] == BUS_SPACE_MEMIO) { - x = readb(ahd->bshs[0].maddr + port); - } else { - x = inb(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF)); - } - mb(); - return (x); -} - -static __inline uint16_t -ahd_inw_atomic(struct ahd_softc * ahd, long port) -{ - uint8_t x; - - if (ahd->tags[0] == BUS_SPACE_MEMIO) { - x = readw(ahd->bshs[0].maddr + port); - } else { - x = inw(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF)); - } - mb(); - return (x); -} - -static __inline void -ahd_outb(struct ahd_softc * ahd, long port, uint8_t val) -{ - if (ahd->tags[0] == BUS_SPACE_MEMIO) { - writeb(val, ahd->bshs[0].maddr + port); - } else { - outb(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF)); - } - mb(); -} - -static __inline void -ahd_outw_atomic(struct ahd_softc * ahd, long port, uint16_t val) -{ - if (ahd->tags[0] == BUS_SPACE_MEMIO) { - writew(val, ahd->bshs[0].maddr + port); - } else { - outw(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF)); - } - mb(); -} - -static __inline void -ahd_outsb(struct ahd_softc * ahd, long port, uint8_t *array, int count) -{ - int i; - - /* - * There is probably a more efficient way to do this on Linux - * but we don't use this for anything speed critical and this - * should work. - */ - for (i = 0; i < count; i++) - ahd_outb(ahd, port, *array++); -} - -static __inline void -ahd_insb(struct ahd_softc * ahd, long port, uint8_t *array, int count) -{ - int i; - - /* - * There is probably a more efficient way to do this on Linux - * but we don't use this for anything speed critical and this - * should work. - */ - for (i = 0; i < count; i++) - *array++ = ahd_inb(ahd, port); -} - /**************************** Initialization **********************************/ int ahd_linux_register_host(struct ahd_softc *, struct scsi_host_template *); @@ -593,62 +485,12 @@ void ahd_linux_pci_exit(void); int ahd_pci_map_registers(struct ahd_softc *ahd); int ahd_pci_map_int(struct ahd_softc *ahd); -static __inline uint32_t ahd_pci_read_config(ahd_dev_softc_t pci, +uint32_t ahd_pci_read_config(ahd_dev_softc_t pci, int reg, int width); - -static __inline uint32_t -ahd_pci_read_config(ahd_dev_softc_t pci, int reg, int width) -{ - switch (width) { - case 1: - { - uint8_t retval; - - pci_read_config_byte(pci, reg, &retval); - return (retval); - } - case 2: - { - uint16_t retval; - pci_read_config_word(pci, reg, &retval); - return (retval); - } - case 4: - { - uint32_t retval; - pci_read_config_dword(pci, reg, &retval); - return (retval); - } - default: - panic("ahd_pci_read_config: Read size too big"); - /* NOTREACHED */ - return (0); - } -} - -static __inline void ahd_pci_write_config(ahd_dev_softc_t pci, +void ahd_pci_write_config(ahd_dev_softc_t pci, int reg, uint32_t value, int width); -static __inline void -ahd_pci_write_config(ahd_dev_softc_t pci, int reg, uint32_t value, int width) -{ - switch (width) { - case 1: - pci_write_config_byte(pci, reg, value); - break; - case 2: - pci_write_config_word(pci, reg, value); - break; - case 4: - pci_write_config_dword(pci, reg, value); - break; - default: - panic("ahd_pci_write_config: Write size too big"); - /* NOTREACHED */ - } -} - static __inline int ahd_get_pci_function(ahd_dev_softc_t); static __inline int ahd_get_pci_function(ahd_dev_softc_t pci) diff -urpN linux-2.6.23/drivers/scsi/aic7xxx/aic7xxx_core.c linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_core.c --- linux-2.6.23/drivers/scsi/aic7xxx/aic7xxx_core.c 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_core.c 2007-10-14 15:02:44.000000000 +0100 @@ -237,6 +237,510 @@ static void ahc_update_scsiid(struct ah static int ahc_handle_target_cmd(struct ahc_softc *ahc, struct target_cmd *cmd); #endif + +/************************* Sequencer Execution Control ************************/ +/* + * Work around any chip bugs related to halting sequencer execution. + * On Ultra2 controllers, we must clear the CIOBUS stretch signal by + * reading a register that will set this signal and deassert it. + * Without this workaround, if the chip is paused, by an interrupt or + * manual pause while accessing scb ram, accesses to certain registers + * will hang the system (infinite pci retries). + */ +void +ahc_pause_bug_fix(struct ahc_softc *ahc) +{ + if ((ahc->features & AHC_ULTRA2) != 0) + (void)ahc_inb(ahc, CCSCBCTL); +} + +/* + * Determine whether the sequencer has halted code execution. + * Returns non-zero status if the sequencer is stopped. + */ +int +ahc_is_paused(struct ahc_softc *ahc) +{ + return ((ahc_inb(ahc, HCNTRL) & PAUSE) != 0); +} + +/* + * Request that the sequencer stop and wait, indefinitely, for it + * to stop. The sequencer will only acknowledge that it is paused + * once it has reached an instruction boundary and PAUSEDIS is + * cleared in the SEQCTL register. The sequencer may use PAUSEDIS + * for critical sections. + */ +void +ahc_pause(struct ahc_softc *ahc) +{ + ahc_outb(ahc, HCNTRL, ahc->pause); + + /* + * Since the sequencer can disable pausing in a critical section, we + * must loop until it actually stops. + */ + while (ahc_is_paused(ahc) == 0) + ; + + ahc_pause_bug_fix(ahc); +} + +/* + * Allow the sequencer to continue program execution. + * We check here to ensure that no additional interrupt + * sources that would cause the sequencer to halt have been + * asserted. If, for example, a SCSI bus reset is detected + * while we are fielding a different, pausing, interrupt type, + * we don't want to release the sequencer before going back + * into our interrupt handler and dealing with this new + * condition. + */ +void +ahc_unpause(struct ahc_softc *ahc) +{ + if ((ahc_inb(ahc, INTSTAT) & (SCSIINT | SEQINT | BRKADRINT)) == 0) + ahc_outb(ahc, HCNTRL, ahc->unpause); +} + +/************************** Memory mapping routines ***************************/ +struct ahc_dma_seg * +ahc_sg_bus_to_virt(struct scb *scb, uint32_t sg_busaddr) +{ + int sg_index; + + sg_index = (sg_busaddr - scb->sg_list_phys)/sizeof(struct ahc_dma_seg); + /* sg_list_phys points to entry 1, not 0 */ + sg_index++; + + return (&scb->sg_list[sg_index]); +} + +uint32_t +ahc_sg_virt_to_bus(struct scb *scb, struct ahc_dma_seg *sg) +{ + int sg_index; + + /* sg_list_phys points to entry 1, not 0 */ + sg_index = sg - &scb->sg_list[1]; + + return (scb->sg_list_phys + (sg_index * sizeof(*scb->sg_list))); +} + +uint32_t +ahc_hscb_busaddr(struct ahc_softc *ahc, u_int index) +{ + return (ahc->scb_data->hscb_busaddr + + (sizeof(struct hardware_scb) * index)); +} + +void +ahc_sync_scb(struct ahc_softc *ahc, struct scb *scb, int op) +{ + ahc_dmamap_sync(ahc, ahc->scb_data->hscb_dmat, + ahc->scb_data->hscb_dmamap, + /*offset*/(scb->hscb - ahc->hscbs) * sizeof(*scb->hscb), + /*len*/sizeof(*scb->hscb), op); +} + +void +ahc_sync_sglist(struct ahc_softc *ahc, struct scb *scb, int op) +{ + if (scb->sg_count == 0) + return; + + ahc_dmamap_sync(ahc, ahc->scb_data->sg_dmat, scb->sg_map->sg_dmamap, + /*offset*/(scb->sg_list - scb->sg_map->sg_vaddr) + * sizeof(struct ahc_dma_seg), + /*len*/sizeof(struct ahc_dma_seg) * scb->sg_count, op); +} + +uint32_t +ahc_targetcmd_offset(struct ahc_softc *ahc, u_int index) +{ + return (((uint8_t *)&ahc->targetcmds[index]) - ahc->qoutfifo); +} + +/*********************** Miscelaneous Support Functions ***********************/ +/* + * Determine whether the sequencer reported a residual + * for this SCB/transaction. + */ +void +ahc_update_residual(struct ahc_softc *ahc, struct scb *scb) +{ + uint32_t sgptr; + + sgptr = ahc_le32toh(scb->hscb->sgptr); + if ((sgptr & SG_RESID_VALID) != 0) + ahc_calc_residual(ahc, scb); +} + +/* + * Return pointers to the transfer negotiation information + * for the specified our_id/remote_id pair. + */ +struct ahc_initiator_tinfo * +ahc_fetch_transinfo(struct ahc_softc *ahc, char channel, u_int our_id, + u_int remote_id, struct ahc_tmode_tstate **tstate) +{ + /* + * Transfer data structures are stored from the perspective + * of the target role. Since the parameters for a connection + * in the initiator role to a given target are the same as + * when the roles are reversed, we pretend we are the target. + */ + if (channel == 'B') + our_id += 8; + *tstate = ahc->enabled_targets[our_id]; + return (&(*tstate)->transinfo[remote_id]); +} + +uint16_t +ahc_inw(struct ahc_softc *ahc, u_int port) +{ + uint16_t r = ahc_inb(ahc, port+1) << 8; + return r | ahc_inb(ahc, port); +} + +void +ahc_outw(struct ahc_softc *ahc, u_int port, u_int value) +{ + ahc_outb(ahc, port, value & 0xFF); + ahc_outb(ahc, port+1, (value >> 8) & 0xFF); +} + +uint32_t +ahc_inl(struct ahc_softc *ahc, u_int port) +{ + return ((ahc_inb(ahc, port)) + | (ahc_inb(ahc, port+1) << 8) + | (ahc_inb(ahc, port+2) << 16) + | (ahc_inb(ahc, port+3) << 24)); +} + +void +ahc_outl(struct ahc_softc *ahc, u_int port, uint32_t value) +{ + ahc_outb(ahc, port, (value) & 0xFF); + ahc_outb(ahc, port+1, ((value) >> 8) & 0xFF); + ahc_outb(ahc, port+2, ((value) >> 16) & 0xFF); + ahc_outb(ahc, port+3, ((value) >> 24) & 0xFF); +} + +uint64_t +ahc_inq(struct ahc_softc *ahc, u_int port) +{ + return ((ahc_inb(ahc, port)) + | (ahc_inb(ahc, port+1) << 8) + | (ahc_inb(ahc, port+2) << 16) + | (ahc_inb(ahc, port+3) << 24) + | (((uint64_t)ahc_inb(ahc, port+4)) << 32) + | (((uint64_t)ahc_inb(ahc, port+5)) << 40) + | (((uint64_t)ahc_inb(ahc, port+6)) << 48) + | (((uint64_t)ahc_inb(ahc, port+7)) << 56)); +} + +void +ahc_outq(struct ahc_softc *ahc, u_int port, uint64_t value) +{ + ahc_outb(ahc, port, value & 0xFF); + ahc_outb(ahc, port+1, (value >> 8) & 0xFF); + ahc_outb(ahc, port+2, (value >> 16) & 0xFF); + ahc_outb(ahc, port+3, (value >> 24) & 0xFF); + ahc_outb(ahc, port+4, (value >> 32) & 0xFF); + ahc_outb(ahc, port+5, (value >> 40) & 0xFF); + ahc_outb(ahc, port+6, (value >> 48) & 0xFF); + ahc_outb(ahc, port+7, (value >> 56) & 0xFF); +} + +/* + * Get a free scb. If there are none, see if we can allocate a new SCB. + */ +struct scb * +ahc_get_scb(struct ahc_softc *ahc) +{ + struct scb *scb; + + if ((scb = SLIST_FIRST(&ahc->scb_data->free_scbs)) == NULL) { + ahc_alloc_scbs(ahc); + scb = SLIST_FIRST(&ahc->scb_data->free_scbs); + if (scb == NULL) + return (NULL); + } + SLIST_REMOVE_HEAD(&ahc->scb_data->free_scbs, links.sle); + return (scb); +} + +/* + * Return an SCB resource to the free list. + */ +void +ahc_free_scb(struct ahc_softc *ahc, struct scb *scb) +{ + struct hardware_scb *hscb; + + hscb = scb->hscb; + /* Clean up for the next user */ + ahc->scb_data->scbindex[hscb->tag] = NULL; + scb->flags = SCB_FREE; + hscb->control = 0; + + SLIST_INSERT_HEAD(&ahc->scb_data->free_scbs, scb, links.sle); + + /* Notify the OSM that a resource is now available. */ + ahc_platform_scb_free(ahc, scb); +} + +struct scb * +ahc_lookup_scb(struct ahc_softc *ahc, u_int tag) +{ + struct scb* scb; + + scb = ahc->scb_data->scbindex[tag]; + if (scb != NULL) + ahc_sync_scb(ahc, scb, + BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); + return (scb); +} + +void +ahc_swap_with_next_hscb(struct ahc_softc *ahc, struct scb *scb) +{ + struct hardware_scb *q_hscb; + u_int saved_tag; + + /* + * Our queuing method is a bit tricky. The card + * knows in advance which HSCB to download, and we + * can't disappoint it. To achieve this, the next + * SCB to download is saved off in ahc->next_queued_scb. + * When we are called to queue "an arbitrary scb", + * we copy the contents of the incoming HSCB to the one + * the sequencer knows about, swap HSCB pointers and + * finally assign the SCB to the tag indexed location + * in the scb_array. This makes sure that we can still + * locate the correct SCB by SCB_TAG. + */ + q_hscb = ahc->next_queued_scb->hscb; + saved_tag = q_hscb->tag; + memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb)); + if ((scb->flags & SCB_CDB32_PTR) != 0) { + q_hscb->shared_data.cdb_ptr = + ahc_htole32(ahc_hscb_busaddr(ahc, q_hscb->tag) + + offsetof(struct hardware_scb, cdb32)); + } + q_hscb->tag = saved_tag; + q_hscb->next = scb->hscb->tag; + + /* Now swap HSCB pointers. */ + ahc->next_queued_scb->hscb = scb->hscb; + scb->hscb = q_hscb; + + /* Now define the mapping from tag to SCB in the scbindex */ + ahc->scb_data->scbindex[scb->hscb->tag] = scb; +} + +/* + * Tell the sequencer about a new transaction to execute. + */ +void +ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb) +{ + ahc_swap_with_next_hscb(ahc, scb); + + if (scb->hscb->tag == SCB_LIST_NULL + || scb->hscb->next == SCB_LIST_NULL) + panic("Attempt to queue invalid SCB tag %x:%x\n", + scb->hscb->tag, scb->hscb->next); + + /* + * Setup data "oddness". + */ + scb->hscb->lun &= LID; + if (ahc_get_transfer_length(scb) & 0x1) + scb->hscb->lun |= SCB_XFERLEN_ODD; + + /* + * Keep a history of SCBs we've downloaded in the qinfifo. + */ + ahc->qinfifo[ahc->qinfifonext++] = scb->hscb->tag; + + /* + * Make sure our data is consistent from the + * perspective of the adapter. + */ + ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); + + /* Tell the adapter about the newly queued SCB */ + if ((ahc->features & AHC_QUEUE_REGS) != 0) { + ahc_outb(ahc, HNSCB_QOFF, ahc->qinfifonext); + } else { + if ((ahc->features & AHC_AUTOPAUSE) == 0) + ahc_pause(ahc); + ahc_outb(ahc, KERNEL_QINPOS, ahc->qinfifonext); + if ((ahc->features & AHC_AUTOPAUSE) == 0) + ahc_unpause(ahc); + } +} + +struct scsi_sense_data * +ahc_get_sense_buf(struct ahc_softc *ahc, struct scb *scb) +{ + int offset; + + offset = scb - ahc->scb_data->scbarray; + return (&ahc->scb_data->sense[offset]); +} + +uint32_t +ahc_get_sense_bufaddr(struct ahc_softc *ahc, struct scb *scb) +{ + int offset; + + offset = scb - ahc->scb_data->scbarray; + return (ahc->scb_data->sense_busaddr + + (offset * sizeof(struct scsi_sense_data))); +} + +/************************** Interrupt Processing ******************************/ +void +ahc_sync_qoutfifo(struct ahc_softc *ahc, int op) +{ + ahc_dmamap_sync(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap, + /*offset*/0, /*len*/256, op); +} + +void +ahc_sync_tqinfifo(struct ahc_softc *ahc, int op) +{ +#ifdef AHC_TARGET_MODE + if ((ahc->flags & AHC_TARGETROLE) != 0) { + ahc_dmamap_sync(ahc, ahc->shared_data_dmat, + ahc->shared_data_dmamap, + ahc_targetcmd_offset(ahc, 0), + sizeof(struct target_cmd) * AHC_TMODE_CMDS, + op); + } +#endif +} + +/* + * See if the firmware has posted any completed commands + * into our in-core command complete fifos. + */ +#define AHC_RUN_QOUTFIFO 0x1 +#define AHC_RUN_TQINFIFO 0x2 +u_int +ahc_check_cmdcmpltqueues(struct ahc_softc *ahc) +{ + u_int retval; + + retval = 0; + ahc_dmamap_sync(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap, + /*offset*/ahc->qoutfifonext, /*len*/1, + BUS_DMASYNC_POSTREAD); + if (ahc->qoutfifo[ahc->qoutfifonext] != SCB_LIST_NULL) + retval |= AHC_RUN_QOUTFIFO; +#ifdef AHC_TARGET_MODE + if ((ahc->flags & AHC_TARGETROLE) != 0 + && (ahc->flags & AHC_TQINFIFO_BLOCKED) == 0) { + ahc_dmamap_sync(ahc, ahc->shared_data_dmat, + ahc->shared_data_dmamap, + ahc_targetcmd_offset(ahc, ahc->tqinfifofnext), + /*len*/sizeof(struct target_cmd), + BUS_DMASYNC_POSTREAD); + if (ahc->targetcmds[ahc->tqinfifonext].cmd_valid != 0) + retval |= AHC_RUN_TQINFIFO; + } +#endif + return (retval); +} + +/* + * Catch an interrupt from the adapter + */ +int +ahc_intr(struct ahc_softc *ahc) +{ + u_int intstat; + + if ((ahc->pause & INTEN) == 0) { + /* + * Our interrupt is not enabled on the chip + * and may be disabled for re-entrancy reasons, + * so just return. This is likely just a shared + * interrupt. + */ + return (0); + } + /* + * Instead of directly reading the interrupt status register, + * infer the cause of the interrupt by checking our in-core + * completion queues. This avoids a costly PCI bus read in + * most cases. + */ + if ((ahc->flags & (AHC_ALL_INTERRUPTS|AHC_EDGE_INTERRUPT)) == 0 + && (ahc_check_cmdcmpltqueues(ahc) != 0)) + intstat = CMDCMPLT; + else { + intstat = ahc_inb(ahc, INTSTAT); + } + + if ((intstat & INT_PEND) == 0) { +#if AHC_PCI_CONFIG > 0 + if (ahc->unsolicited_ints > 500) { + ahc->unsolicited_ints = 0; + if ((ahc->chip & AHC_PCI) != 0 + && (ahc_inb(ahc, ERROR) & PCIERRSTAT) != 0) + ahc->bus_intr(ahc); + } +#endif + ahc->unsolicited_ints++; + return (0); + } + ahc->unsolicited_ints = 0; + + if (intstat & CMDCMPLT) { + ahc_outb(ahc, CLRINT, CLRCMDINT); + + /* + * Ensure that the chip sees that we've cleared + * this interrupt before we walk the output fifo. + * Otherwise, we may, due to posted bus writes, + * clear the interrupt after we finish the scan, + * and after the sequencer has added new entries + * and asserted the interrupt again. + */ + ahc_flush_device_writes(ahc); + ahc_run_qoutfifo(ahc); +#ifdef AHC_TARGET_MODE + if ((ahc->flags & AHC_TARGETROLE) != 0) + ahc_run_tqinfifo(ahc, /*paused*/FALSE); +#endif + } + + /* + * Handle statuses that may invalidate our cached + * copy of INTSTAT separately. + */ + if (intstat == 0xFF && (ahc->features & AHC_REMOVABLE) != 0) { + /* Hot eject. Do nothing */ + } else if (intstat & BRKADRINT) { + ahc_handle_brkadrint(ahc); + } else if ((intstat & (SEQINT|SCSIINT)) != 0) { + + ahc_pause_bug_fix(ahc); + + if ((intstat & SEQINT) != 0) + ahc_handle_seqint(ahc, intstat); + + if ((intstat & SCSIINT) != 0) + ahc_handle_scsiint(ahc, intstat); + } + return (1); +} + /************************* Sequencer Execution Control ************************/ /* * Restart the sequencer program from address zero diff -urpN linux-2.6.23/drivers/scsi/aic7xxx/aic7xxx_inline.h linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_inline.h --- linux-2.6.23/drivers/scsi/aic7xxx/aic7xxx_inline.h 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_inline.h 2007-10-14 15:02:44.000000000 +0100 @@ -46,74 +46,10 @@ #define _AIC7XXX_INLINE_H_ /************************* Sequencer Execution Control ************************/ -static __inline void ahc_pause_bug_fix(struct ahc_softc *ahc); -static __inline int ahc_is_paused(struct ahc_softc *ahc); -static __inline void ahc_pause(struct ahc_softc *ahc); -static __inline void ahc_unpause(struct ahc_softc *ahc); - -/* - * Work around any chip bugs related to halting sequencer execution. - * On Ultra2 controllers, we must clear the CIOBUS stretch signal by - * reading a register that will set this signal and deassert it. - * Without this workaround, if the chip is paused, by an interrupt or - * manual pause while accessing scb ram, accesses to certain registers - * will hang the system (infinite pci retries). - */ -static __inline void -ahc_pause_bug_fix(struct ahc_softc *ahc) -{ - if ((ahc->features & AHC_ULTRA2) != 0) - (void)ahc_inb(ahc, CCSCBCTL); -} - -/* - * Determine whether the sequencer has halted code execution. - * Returns non-zero status if the sequencer is stopped. - */ -static __inline int -ahc_is_paused(struct ahc_softc *ahc) -{ - return ((ahc_inb(ahc, HCNTRL) & PAUSE) != 0); -} - -/* - * Request that the sequencer stop and wait, indefinitely, for it - * to stop. The sequencer will only acknowledge that it is paused - * once it has reached an instruction boundary and PAUSEDIS is - * cleared in the SEQCTL register. The sequencer may use PAUSEDIS - * for critical sections. - */ -static __inline void -ahc_pause(struct ahc_softc *ahc) -{ - ahc_outb(ahc, HCNTRL, ahc->pause); - - /* - * Since the sequencer can disable pausing in a critical section, we - * must loop until it actually stops. - */ - while (ahc_is_paused(ahc) == 0) - ; - - ahc_pause_bug_fix(ahc); -} - -/* - * Allow the sequencer to continue program execution. - * We check here to ensure that no additional interrupt - * sources that would cause the sequencer to halt have been - * asserted. If, for example, a SCSI bus reset is detected - * while we are fielding a different, pausing, interrupt type, - * we don't want to release the sequencer before going back - * into our interrupt handler and dealing with this new - * condition. - */ -static __inline void -ahc_unpause(struct ahc_softc *ahc) -{ - if ((ahc_inb(ahc, INTSTAT) & (SCSIINT | SEQINT | BRKADRINT)) == 0) - ahc_outb(ahc, HCNTRL, ahc->unpause); -} +void ahc_pause_bug_fix(struct ahc_softc *ahc); +int ahc_is_paused(struct ahc_softc *ahc); +void ahc_pause(struct ahc_softc *ahc); +void ahc_unpause(struct ahc_softc *ahc); /*********************** Untagged Transaction Routines ************************/ static __inline void ahc_freeze_untagged_queues(struct ahc_softc *ahc); @@ -147,78 +83,21 @@ ahc_release_untagged_queues(struct ahc_s } /************************** Memory mapping routines ***************************/ -static __inline struct ahc_dma_seg * - ahc_sg_bus_to_virt(struct scb *scb, - uint32_t sg_busaddr); -static __inline uint32_t - ahc_sg_virt_to_bus(struct scb *scb, - struct ahc_dma_seg *sg); -static __inline uint32_t - ahc_hscb_busaddr(struct ahc_softc *ahc, u_int index); -static __inline void ahc_sync_scb(struct ahc_softc *ahc, - struct scb *scb, int op); -static __inline void ahc_sync_sglist(struct ahc_softc *ahc, - struct scb *scb, int op); -static __inline uint32_t - ahc_targetcmd_offset(struct ahc_softc *ahc, - u_int index); - -static __inline struct ahc_dma_seg * -ahc_sg_bus_to_virt(struct scb *scb, uint32_t sg_busaddr) -{ - int sg_index; - - sg_index = (sg_busaddr - scb->sg_list_phys)/sizeof(struct ahc_dma_seg); - /* sg_list_phys points to entry 1, not 0 */ - sg_index++; - - return (&scb->sg_list[sg_index]); -} - -static __inline uint32_t -ahc_sg_virt_to_bus(struct scb *scb, struct ahc_dma_seg *sg) -{ - int sg_index; - - /* sg_list_phys points to entry 1, not 0 */ - sg_index = sg - &scb->sg_list[1]; - - return (scb->sg_list_phys + (sg_index * sizeof(*scb->sg_list))); -} - -static __inline uint32_t -ahc_hscb_busaddr(struct ahc_softc *ahc, u_int index) -{ - return (ahc->scb_data->hscb_busaddr - + (sizeof(struct hardware_scb) * index)); -} - -static __inline void -ahc_sync_scb(struct ahc_softc *ahc, struct scb *scb, int op) -{ - ahc_dmamap_sync(ahc, ahc->scb_data->hscb_dmat, - ahc->scb_data->hscb_dmamap, - /*offset*/(scb->hscb - ahc->hscbs) * sizeof(*scb->hscb), - /*len*/sizeof(*scb->hscb), op); -} - -static __inline void -ahc_sync_sglist(struct ahc_softc *ahc, struct scb *scb, int op) -{ - if (scb->sg_count == 0) - return; - - ahc_dmamap_sync(ahc, ahc->scb_data->sg_dmat, scb->sg_map->sg_dmamap, - /*offset*/(scb->sg_list - scb->sg_map->sg_vaddr) - * sizeof(struct ahc_dma_seg), - /*len*/sizeof(struct ahc_dma_seg) * scb->sg_count, op); -} - -static __inline uint32_t -ahc_targetcmd_offset(struct ahc_softc *ahc, u_int index) -{ - return (((uint8_t *)&ahc->targetcmds[index]) - ahc->qoutfifo); -} +struct ahc_dma_seg * + ahc_sg_bus_to_virt(struct scb *scb, + uint32_t sg_busaddr); +uint32_t + ahc_sg_virt_to_bus(struct scb *scb, + struct ahc_dma_seg *sg); +uint32_t + ahc_hscb_busaddr(struct ahc_softc *ahc, u_int index); +void ahc_sync_scb(struct ahc_softc *ahc, + struct scb *scb, int op); +void ahc_sync_sglist(struct ahc_softc *ahc, + struct scb *scb, int op); +uint32_t + ahc_targetcmd_offset(struct ahc_softc *ahc, + u_int index); /******************************** Debugging ***********************************/ static __inline char *ahc_name(struct ahc_softc *ahc); @@ -230,421 +109,44 @@ ahc_name(struct ahc_softc *ahc) } /*********************** Miscelaneous Support Functions ***********************/ - -static __inline void ahc_update_residual(struct ahc_softc *ahc, - struct scb *scb); -static __inline struct ahc_initiator_tinfo * - ahc_fetch_transinfo(struct ahc_softc *ahc, - char channel, u_int our_id, - u_int remote_id, - struct ahc_tmode_tstate **tstate); -static __inline uint16_t - ahc_inw(struct ahc_softc *ahc, u_int port); -static __inline void ahc_outw(struct ahc_softc *ahc, u_int port, - u_int value); -static __inline uint32_t - ahc_inl(struct ahc_softc *ahc, u_int port); -static __inline void ahc_outl(struct ahc_softc *ahc, u_int port, - uint32_t value); -static __inline uint64_t - ahc_inq(struct ahc_softc *ahc, u_int port); -static __inline void ahc_outq(struct ahc_softc *ahc, u_int port, - uint64_t value); -static __inline struct scb* - ahc_get_scb(struct ahc_softc *ahc); -static __inline void ahc_free_scb(struct ahc_softc *ahc, struct scb *scb); -static __inline void ahc_swap_with_next_hscb(struct ahc_softc *ahc, - struct scb *scb); -static __inline void ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb); -static __inline struct scsi_sense_data * - ahc_get_sense_buf(struct ahc_softc *ahc, - struct scb *scb); -static __inline uint32_t - ahc_get_sense_bufaddr(struct ahc_softc *ahc, - struct scb *scb); - -/* - * Determine whether the sequencer reported a residual - * for this SCB/transaction. - */ -static __inline void -ahc_update_residual(struct ahc_softc *ahc, struct scb *scb) -{ - uint32_t sgptr; - - sgptr = ahc_le32toh(scb->hscb->sgptr); - if ((sgptr & SG_RESID_VALID) != 0) - ahc_calc_residual(ahc, scb); -} - -/* - * Return pointers to the transfer negotiation information - * for the specified our_id/remote_id pair. - */ -static __inline struct ahc_initiator_tinfo * -ahc_fetch_transinfo(struct ahc_softc *ahc, char channel, u_int our_id, - u_int remote_id, struct ahc_tmode_tstate **tstate) -{ - /* - * Transfer data structures are stored from the perspective - * of the target role. Since the parameters for a connection - * in the initiator role to a given target are the same as - * when the roles are reversed, we pretend we are the target. - */ - if (channel == 'B') - our_id += 8; - *tstate = ahc->enabled_targets[our_id]; - return (&(*tstate)->transinfo[remote_id]); -} - -static __inline uint16_t -ahc_inw(struct ahc_softc *ahc, u_int port) -{ - uint16_t r = ahc_inb(ahc, port+1) << 8; - return r | ahc_inb(ahc, port); -} - -static __inline void -ahc_outw(struct ahc_softc *ahc, u_int port, u_int value) -{ - ahc_outb(ahc, port, value & 0xFF); - ahc_outb(ahc, port+1, (value >> 8) & 0xFF); -} - -static __inline uint32_t -ahc_inl(struct ahc_softc *ahc, u_int port) -{ - return ((ahc_inb(ahc, port)) - | (ahc_inb(ahc, port+1) << 8) - | (ahc_inb(ahc, port+2) << 16) - | (ahc_inb(ahc, port+3) << 24)); -} - -static __inline void -ahc_outl(struct ahc_softc *ahc, u_int port, uint32_t value) -{ - ahc_outb(ahc, port, (value) & 0xFF); - ahc_outb(ahc, port+1, ((value) >> 8) & 0xFF); - ahc_outb(ahc, port+2, ((value) >> 16) & 0xFF); - ahc_outb(ahc, port+3, ((value) >> 24) & 0xFF); -} - -static __inline uint64_t -ahc_inq(struct ahc_softc *ahc, u_int port) -{ - return ((ahc_inb(ahc, port)) - | (ahc_inb(ahc, port+1) << 8) - | (ahc_inb(ahc, port+2) << 16) - | (ahc_inb(ahc, port+3) << 24) - | (((uint64_t)ahc_inb(ahc, port+4)) << 32) - | (((uint64_t)ahc_inb(ahc, port+5)) << 40) - | (((uint64_t)ahc_inb(ahc, port+6)) << 48) - | (((uint64_t)ahc_inb(ahc, port+7)) << 56)); -} - -static __inline void -ahc_outq(struct ahc_softc *ahc, u_int port, uint64_t value) -{ - ahc_outb(ahc, port, value & 0xFF); - ahc_outb(ahc, port+1, (value >> 8) & 0xFF); - ahc_outb(ahc, port+2, (value >> 16) & 0xFF); - ahc_outb(ahc, port+3, (value >> 24) & 0xFF); - ahc_outb(ahc, port+4, (value >> 32) & 0xFF); - ahc_outb(ahc, port+5, (value >> 40) & 0xFF); - ahc_outb(ahc, port+6, (value >> 48) & 0xFF); - ahc_outb(ahc, port+7, (value >> 56) & 0xFF); -} - -/* - * Get a free scb. If there are none, see if we can allocate a new SCB. - */ -static __inline struct scb * -ahc_get_scb(struct ahc_softc *ahc) -{ - struct scb *scb; - - if ((scb = SLIST_FIRST(&ahc->scb_data->free_scbs)) == NULL) { - ahc_alloc_scbs(ahc); - scb = SLIST_FIRST(&ahc->scb_data->free_scbs); - if (scb == NULL) - return (NULL); - } - SLIST_REMOVE_HEAD(&ahc->scb_data->free_scbs, links.sle); - return (scb); -} - -/* - * Return an SCB resource to the free list. - */ -static __inline void -ahc_free_scb(struct ahc_softc *ahc, struct scb *scb) -{ - struct hardware_scb *hscb; - - hscb = scb->hscb; - /* Clean up for the next user */ - ahc->scb_data->scbindex[hscb->tag] = NULL; - scb->flags = SCB_FREE; - hscb->control = 0; - - SLIST_INSERT_HEAD(&ahc->scb_data->free_scbs, scb, links.sle); - - /* Notify the OSM that a resource is now available. */ - ahc_platform_scb_free(ahc, scb); -} - -static __inline struct scb * -ahc_lookup_scb(struct ahc_softc *ahc, u_int tag) -{ - struct scb* scb; - - scb = ahc->scb_data->scbindex[tag]; - if (scb != NULL) - ahc_sync_scb(ahc, scb, - BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); - return (scb); -} - -static __inline void -ahc_swap_with_next_hscb(struct ahc_softc *ahc, struct scb *scb) -{ - struct hardware_scb *q_hscb; - u_int saved_tag; - - /* - * Our queuing method is a bit tricky. The card - * knows in advance which HSCB to download, and we - * can't disappoint it. To achieve this, the next - * SCB to download is saved off in ahc->next_queued_scb. - * When we are called to queue "an arbitrary scb", - * we copy the contents of the incoming HSCB to the one - * the sequencer knows about, swap HSCB pointers and - * finally assign the SCB to the tag indexed location - * in the scb_array. This makes sure that we can still - * locate the correct SCB by SCB_TAG. - */ - q_hscb = ahc->next_queued_scb->hscb; - saved_tag = q_hscb->tag; - memcpy(q_hscb, scb->hscb, sizeof(*scb->hscb)); - if ((scb->flags & SCB_CDB32_PTR) != 0) { - q_hscb->shared_data.cdb_ptr = - ahc_htole32(ahc_hscb_busaddr(ahc, q_hscb->tag) - + offsetof(struct hardware_scb, cdb32)); - } - q_hscb->tag = saved_tag; - q_hscb->next = scb->hscb->tag; - - /* Now swap HSCB pointers. */ - ahc->next_queued_scb->hscb = scb->hscb; - scb->hscb = q_hscb; - - /* Now define the mapping from tag to SCB in the scbindex */ - ahc->scb_data->scbindex[scb->hscb->tag] = scb; -} - -/* - * Tell the sequencer about a new transaction to execute. - */ -static __inline void -ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb) -{ - ahc_swap_with_next_hscb(ahc, scb); - - if (scb->hscb->tag == SCB_LIST_NULL - || scb->hscb->next == SCB_LIST_NULL) - panic("Attempt to queue invalid SCB tag %x:%x\n", - scb->hscb->tag, scb->hscb->next); - - /* - * Setup data "oddness". - */ - scb->hscb->lun &= LID; - if (ahc_get_transfer_length(scb) & 0x1) - scb->hscb->lun |= SCB_XFERLEN_ODD; - - /* - * Keep a history of SCBs we've downloaded in the qinfifo. - */ - ahc->qinfifo[ahc->qinfifonext++] = scb->hscb->tag; - - /* - * Make sure our data is consistent from the - * perspective of the adapter. - */ - ahc_sync_scb(ahc, scb, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); - - /* Tell the adapter about the newly queued SCB */ - if ((ahc->features & AHC_QUEUE_REGS) != 0) { - ahc_outb(ahc, HNSCB_QOFF, ahc->qinfifonext); - } else { - if ((ahc->features & AHC_AUTOPAUSE) == 0) - ahc_pause(ahc); - ahc_outb(ahc, KERNEL_QINPOS, ahc->qinfifonext); - if ((ahc->features & AHC_AUTOPAUSE) == 0) - ahc_unpause(ahc); - } -} - -static __inline struct scsi_sense_data * -ahc_get_sense_buf(struct ahc_softc *ahc, struct scb *scb) -{ - int offset; - - offset = scb - ahc->scb_data->scbarray; - return (&ahc->scb_data->sense[offset]); -} - -static __inline uint32_t -ahc_get_sense_bufaddr(struct ahc_softc *ahc, struct scb *scb) -{ - int offset; - - offset = scb - ahc->scb_data->scbarray; - return (ahc->scb_data->sense_busaddr - + (offset * sizeof(struct scsi_sense_data))); -} +void ahc_update_residual(struct ahc_softc *ahc, + struct scb *scb); +struct ahc_initiator_tinfo * + ahc_fetch_transinfo(struct ahc_softc *ahc, + char channel, u_int our_id, + u_int remote_id, + struct ahc_tmode_tstate **tstate); +uint16_t + ahc_inw(struct ahc_softc *ahc, u_int port); +void ahc_outw(struct ahc_softc *ahc, u_int port, + u_int value); +uint32_t + ahc_inl(struct ahc_softc *ahc, u_int port); +void ahc_outl(struct ahc_softc *ahc, u_int port, + uint32_t value); +uint64_t + ahc_inq(struct ahc_softc *ahc, u_int port); +void ahc_outq(struct ahc_softc *ahc, u_int port, + uint64_t value); +struct scb* + ahc_get_scb(struct ahc_softc *ahc); +void ahc_free_scb(struct ahc_softc *ahc, struct scb *scb); +struct scb * + ahc_lookup_scb(struct ahc_softc *ahc, u_int tag); +void ahc_swap_with_next_hscb(struct ahc_softc *ahc, + struct scb *scb); +void ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb); +struct scsi_sense_data * + ahc_get_sense_buf(struct ahc_softc *ahc, + struct scb *scb); +uint32_t + ahc_get_sense_bufaddr(struct ahc_softc *ahc, + struct scb *scb); /************************** Interrupt Processing ******************************/ -static __inline void ahc_sync_qoutfifo(struct ahc_softc *ahc, int op); -static __inline void ahc_sync_tqinfifo(struct ahc_softc *ahc, int op); -static __inline u_int ahc_check_cmdcmpltqueues(struct ahc_softc *ahc); -static __inline int ahc_intr(struct ahc_softc *ahc); - -static __inline void -ahc_sync_qoutfifo(struct ahc_softc *ahc, int op) -{ - ahc_dmamap_sync(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap, - /*offset*/0, /*len*/256, op); -} - -static __inline void -ahc_sync_tqinfifo(struct ahc_softc *ahc, int op) -{ -#ifdef AHC_TARGET_MODE - if ((ahc->flags & AHC_TARGETROLE) != 0) { - ahc_dmamap_sync(ahc, ahc->shared_data_dmat, - ahc->shared_data_dmamap, - ahc_targetcmd_offset(ahc, 0), - sizeof(struct target_cmd) * AHC_TMODE_CMDS, - op); - } -#endif -} - -/* - * See if the firmware has posted any completed commands - * into our in-core command complete fifos. - */ -#define AHC_RUN_QOUTFIFO 0x1 -#define AHC_RUN_TQINFIFO 0x2 -static __inline u_int -ahc_check_cmdcmpltqueues(struct ahc_softc *ahc) -{ - u_int retval; - - retval = 0; - ahc_dmamap_sync(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap, - /*offset*/ahc->qoutfifonext, /*len*/1, - BUS_DMASYNC_POSTREAD); - if (ahc->qoutfifo[ahc->qoutfifonext] != SCB_LIST_NULL) - retval |= AHC_RUN_QOUTFIFO; -#ifdef AHC_TARGET_MODE - if ((ahc->flags & AHC_TARGETROLE) != 0 - && (ahc->flags & AHC_TQINFIFO_BLOCKED) == 0) { - ahc_dmamap_sync(ahc, ahc->shared_data_dmat, - ahc->shared_data_dmamap, - ahc_targetcmd_offset(ahc, ahc->tqinfifofnext), - /*len*/sizeof(struct target_cmd), - BUS_DMASYNC_POSTREAD); - if (ahc->targetcmds[ahc->tqinfifonext].cmd_valid != 0) - retval |= AHC_RUN_TQINFIFO; - } -#endif - return (retval); -} - -/* - * Catch an interrupt from the adapter - */ -static __inline int -ahc_intr(struct ahc_softc *ahc) -{ - u_int intstat; - - if ((ahc->pause & INTEN) == 0) { - /* - * Our interrupt is not enabled on the chip - * and may be disabled for re-entrancy reasons, - * so just return. This is likely just a shared - * interrupt. - */ - return (0); - } - /* - * Instead of directly reading the interrupt status register, - * infer the cause of the interrupt by checking our in-core - * completion queues. This avoids a costly PCI bus read in - * most cases. - */ - if ((ahc->flags & (AHC_ALL_INTERRUPTS|AHC_EDGE_INTERRUPT)) == 0 - && (ahc_check_cmdcmpltqueues(ahc) != 0)) - intstat = CMDCMPLT; - else { - intstat = ahc_inb(ahc, INTSTAT); - } - - if ((intstat & INT_PEND) == 0) { -#if AHC_PCI_CONFIG > 0 - if (ahc->unsolicited_ints > 500) { - ahc->unsolicited_ints = 0; - if ((ahc->chip & AHC_PCI) != 0 - && (ahc_inb(ahc, ERROR) & PCIERRSTAT) != 0) - ahc->bus_intr(ahc); - } -#endif - ahc->unsolicited_ints++; - return (0); - } - ahc->unsolicited_ints = 0; - - if (intstat & CMDCMPLT) { - ahc_outb(ahc, CLRINT, CLRCMDINT); - - /* - * Ensure that the chip sees that we've cleared - * this interrupt before we walk the output fifo. - * Otherwise, we may, due to posted bus writes, - * clear the interrupt after we finish the scan, - * and after the sequencer has added new entries - * and asserted the interrupt again. - */ - ahc_flush_device_writes(ahc); - ahc_run_qoutfifo(ahc); -#ifdef AHC_TARGET_MODE - if ((ahc->flags & AHC_TARGETROLE) != 0) - ahc_run_tqinfifo(ahc, /*paused*/FALSE); -#endif - } - - /* - * Handle statuses that may invalidate our cached - * copy of INTSTAT separately. - */ - if (intstat == 0xFF && (ahc->features & AHC_REMOVABLE) != 0) { - /* Hot eject. Do nothing */ - } else if (intstat & BRKADRINT) { - ahc_handle_brkadrint(ahc); - } else if ((intstat & (SEQINT|SCSIINT)) != 0) { - - ahc_pause_bug_fix(ahc); - - if ((intstat & SEQINT) != 0) - ahc_handle_seqint(ahc, intstat); - - if ((intstat & SCSIINT) != 0) - ahc_handle_scsiint(ahc, intstat); - } - return (1); -} +void ahc_sync_qoutfifo(struct ahc_softc *ahc, int op); +void ahc_sync_tqinfifo(struct ahc_softc *ahc, int op); +u_int ahc_check_cmdcmpltqueues(struct ahc_softc *ahc); +int ahc_intr(struct ahc_softc *ahc); #endif /* _AIC7XXX_INLINE_H_ */ diff -urpN linux-2.6.23/drivers/scsi/aic7xxx/aic7xxx_osm.c linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_osm.c --- linux-2.6.23/drivers/scsi/aic7xxx/aic7xxx_osm.c 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_osm.c 2007-10-14 15:02:44.000000000 +0100 @@ -388,14 +388,83 @@ static int aic7xxx_setup(char *s); static int ahc_linux_unit; +/************************** OS Utility Wrappers *******************************/ +void +ahc_delay(long usec) +{ + /* + * udelay on Linux can have problems for + * multi-millisecond waits. Wait at most + * 1024us per call. + */ + while (usec > 0) { + udelay(usec % 1024); + usec -= 1024; + } +} + +/***************************** Low Level I/O **********************************/ +uint8_t +ahc_inb(struct ahc_softc * ahc, long port) +{ + uint8_t x; + + if (ahc->tag == BUS_SPACE_MEMIO) { + x = readb(ahc->bsh.maddr + port); + } else { + x = inb(ahc->bsh.ioport + port); + } + mb(); + return (x); +} + +void +ahc_outb(struct ahc_softc * ahc, long port, uint8_t val) +{ + if (ahc->tag == BUS_SPACE_MEMIO) { + writeb(val, ahc->bsh.maddr + port); + } else { + outb(val, ahc->bsh.ioport + port); + } + mb(); +} + +void +ahc_outsb(struct ahc_softc * ahc, long port, uint8_t *array, int count) +{ + int i; + + /* + * There is probably a more efficient way to do this on Linux + * but we don't use this for anything speed critical and this + * should work. + */ + for (i = 0; i < count; i++) + ahc_outb(ahc, port, *array++); +} + +void +ahc_insb(struct ahc_softc * ahc, long port, uint8_t *array, int count) +{ + int i; + + /* + * There is probably a more efficient way to do this on Linux + * but we don't use this for anything speed critical and this + * should work. + */ + for (i = 0; i < count; i++) + *array++ = ahc_inb(ahc, port); +} + /********************************* Inlines ************************************/ -static __inline void ahc_linux_unmap_scb(struct ahc_softc*, struct scb*); +static void ahc_linux_unmap_scb(struct ahc_softc*, struct scb*); -static __inline int ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb, +static int ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb, struct ahc_dma_seg *sg, dma_addr_t addr, bus_size_t len); -static __inline void +static void ahc_linux_unmap_scb(struct ahc_softc *ahc, struct scb *scb) { struct scsi_cmnd *cmd; @@ -406,7 +475,7 @@ ahc_linux_unmap_scb(struct ahc_softc *ah scsi_dma_unmap(cmd); } -static __inline int +static int ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb, struct ahc_dma_seg *sg, dma_addr_t addr, bus_size_t len) { diff -urpN linux-2.6.23/drivers/scsi/aic7xxx/aic7xxx_osm.h linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_osm.h --- linux-2.6.23/drivers/scsi/aic7xxx/aic7xxx_osm.h 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_osm.h 2007-10-14 15:02:44.000000000 +0100 @@ -375,82 +375,16 @@ struct ahc_platform_data { #define malloc(size, type, flags) kmalloc(size, flags) #define free(ptr, type) kfree(ptr) -static __inline void ahc_delay(long); -static __inline void -ahc_delay(long usec) -{ - /* - * udelay on Linux can have problems for - * multi-millisecond waits. Wait at most - * 1024us per call. - */ - while (usec > 0) { - udelay(usec % 1024); - usec -= 1024; - } -} +void ahc_delay(long); /***************************** Low Level I/O **********************************/ -static __inline uint8_t ahc_inb(struct ahc_softc * ahc, long port); -static __inline void ahc_outb(struct ahc_softc * ahc, long port, uint8_t val); -static __inline void ahc_outsb(struct ahc_softc * ahc, long port, - uint8_t *, int count); -static __inline void ahc_insb(struct ahc_softc * ahc, long port, - uint8_t *, int count); - -static __inline uint8_t -ahc_inb(struct ahc_softc * ahc, long port) -{ - uint8_t x; - - if (ahc->tag == BUS_SPACE_MEMIO) { - x = readb(ahc->bsh.maddr + port); - } else { - x = inb(ahc->bsh.ioport + port); - } - mb(); - return (x); -} - -static __inline void -ahc_outb(struct ahc_softc * ahc, long port, uint8_t val) -{ - if (ahc->tag == BUS_SPACE_MEMIO) { - writeb(val, ahc->bsh.maddr + port); - } else { - outb(val, ahc->bsh.ioport + port); - } - mb(); -} - -static __inline void -ahc_outsb(struct ahc_softc * ahc, long port, uint8_t *array, int count) -{ - int i; - - /* - * There is probably a more efficient way to do this on Linux - * but we don't use this for anything speed critical and this - * should work. - */ - for (i = 0; i < count; i++) - ahc_outb(ahc, port, *array++); -} - -static __inline void -ahc_insb(struct ahc_softc * ahc, long port, uint8_t *array, int count) -{ - int i; - - /* - * There is probably a more efficient way to do this on Linux - * but we don't use this for anything speed critical and this - * should work. - */ - for (i = 0; i < count; i++) - *array++ = ahc_inb(ahc, port); -} +uint8_t ahc_inb(struct ahc_softc * ahc, long port); +void ahc_outb(struct ahc_softc * ahc, long port, uint8_t val); +void ahc_outsb(struct ahc_softc * ahc, long port, + uint8_t *, int count); +void ahc_insb(struct ahc_softc * ahc, long port, + uint8_t *, int count); /**************************** Initialization **********************************/ int ahc_linux_register_host(struct ahc_softc *, @@ -555,61 +489,12 @@ void ahc_linux_pci_exit(void); int ahc_pci_map_registers(struct ahc_softc *ahc); int ahc_pci_map_int(struct ahc_softc *ahc); -static __inline uint32_t ahc_pci_read_config(ahc_dev_softc_t pci, +uint32_t ahc_pci_read_config(ahc_dev_softc_t pci, int reg, int width); -static __inline uint32_t -ahc_pci_read_config(ahc_dev_softc_t pci, int reg, int width) -{ - switch (width) { - case 1: - { - uint8_t retval; - - pci_read_config_byte(pci, reg, &retval); - return (retval); - } - case 2: - { - uint16_t retval; - pci_read_config_word(pci, reg, &retval); - return (retval); - } - case 4: - { - uint32_t retval; - pci_read_config_dword(pci, reg, &retval); - return (retval); - } - default: - panic("ahc_pci_read_config: Read size too big"); - /* NOTREACHED */ - return (0); - } -} - -static __inline void ahc_pci_write_config(ahc_dev_softc_t pci, - int reg, uint32_t value, - int width); - -static __inline void -ahc_pci_write_config(ahc_dev_softc_t pci, int reg, uint32_t value, int width) -{ - switch (width) { - case 1: - pci_write_config_byte(pci, reg, value); - break; - case 2: - pci_write_config_word(pci, reg, value); - break; - case 4: - pci_write_config_dword(pci, reg, value); - break; - default: - panic("ahc_pci_write_config: Write size too big"); - /* NOTREACHED */ - } -} +void ahc_pci_write_config(ahc_dev_softc_t pci, + int reg, uint32_t value, + int width); static __inline int ahc_get_pci_function(ahc_dev_softc_t); static __inline int diff -urpN linux-2.6.23/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c --- linux-2.6.23/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 2007-10-14 15:02:44.000000000 +0100 @@ -130,6 +130,57 @@ static struct pci_device_id ahc_linux_pc MODULE_DEVICE_TABLE(pci, ahc_linux_pci_id_table); +/******************************* PCI Routines *********************************/ +uint32_t +ahc_pci_read_config(ahc_dev_softc_t pci, int reg, int width) +{ + switch (width) { + case 1: + { + uint8_t retval; + + pci_read_config_byte(pci, reg, &retval); + return (retval); + } + case 2: + { + uint16_t retval; + pci_read_config_word(pci, reg, &retval); + return (retval); + } + case 4: + { + uint32_t retval; + pci_read_config_dword(pci, reg, &retval); + return (retval); + } + default: + panic("ahc_pci_read_config: Read size too big"); + /* NOTREACHED */ + return (0); + } +} + +void +ahc_pci_write_config(ahc_dev_softc_t pci, int reg, uint32_t value, int width) +{ + switch (width) { + case 1: + pci_write_config_byte(pci, reg, value); + break; + case 2: + pci_write_config_word(pci, reg, value); + break; + case 4: + pci_write_config_dword(pci, reg, value); + break; + default: + panic("ahc_pci_write_config: Write size too big"); + /* NOTREACHED */ + } +} + + static struct pci_driver aic7xxx_pci_driver = { .name = "aic7xxx", .probe = ahc_linux_pci_dev_probe, ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2007-10-14 15:00 ` [PATCH 1/3] " Denys Vlasenko @ 2007-10-14 15:01 ` Denys Vlasenko 2007-10-14 15:02 ` [PATCH 3/3] " Denys Vlasenko 0 siblings, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2007-10-14 15:01 UTC (permalink / raw) To: Andrew Morton; +Cc: Hannes Reinecke, linux-scsi, linux-kernel [-- Attachment #1: Type: text/plain, Size: 131 bytes --] Adds statics, #ifdefs out huge amount of unused code, adds consts Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> -- vda [-- Attachment #2: linux-2.6.23-aic-2-addstatic.patch --] [-- Type: text/x-diff, Size: 204305 bytes --] diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx.h linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx.h --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx.h 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx.h 2007-10-14 15:05:07.000000000 +0100 @@ -1307,7 +1307,7 @@ typedef int (ahd_device_setup_t)(struct struct ahd_pci_identity { uint64_t full_id; uint64_t id_mask; - char *name; + const char *name; ahd_device_setup_t *setup; }; @@ -1315,7 +1315,7 @@ struct ahd_pci_identity { struct aic7770_identity { uint32_t full_id; uint32_t id_mask; - char *name; + const char *name; ahd_device_setup_t *setup; }; extern struct aic7770_identity aic7770_ident_table []; @@ -1326,7 +1326,6 @@ extern const int ahd_num_aic7770_devs; /*************************** Function Declarations ****************************/ /******************************************************************************/ -void ahd_reset_cmds_pending(struct ahd_softc *ahd); /***************************** PCI Front End *********************************/ struct ahd_pci_identity *ahd_find_pci_device(ahd_dev_softc_t); @@ -1362,16 +1361,6 @@ int ahd_write_flexport(struct ahd_sof int ahd_read_flexport(struct ahd_softc *ahd, u_int addr, uint8_t *value); -/*************************** Interrupt Services *******************************/ -void ahd_run_qoutfifo(struct ahd_softc *ahd); -#ifdef AHD_TARGET_MODE -void ahd_run_tqinfifo(struct ahd_softc *ahd, int paused); -#endif -void ahd_handle_hwerrint(struct ahd_softc *ahd); -void ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat); -void ahd_handle_scsiint(struct ahd_softc *ahd, - u_int intstat); - /***************************** Error Recovery *********************************/ typedef enum { SEARCH_COMPLETE, @@ -1465,7 +1454,7 @@ extern uint32_t ahd_debug; void ahd_print_devinfo(struct ahd_softc *ahd, struct ahd_devinfo *devinfo); void ahd_dump_card_state(struct ahd_softc *ahd); -int ahd_print_register(ahd_reg_parse_entry_t *table, +int ahd_print_register(const ahd_reg_parse_entry_t *table, u_int num_entries, const char *name, u_int address, diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_core.c linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_core.c --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_core.c 2007-10-14 15:02:44.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_core.c 2007-10-14 15:05:07.000000000 +0100 @@ -266,6 +266,18 @@ static int ahd_match_scb(struct ahd_sof int target, char channel, int lun, u_int tag, role_t role); +static void ahd_reset_cmds_pending(struct ahd_softc *ahd); + +/*************************** Interrupt Services *******************************/ +static void ahd_run_qoutfifo(struct ahd_softc *ahd); +#ifdef AHD_TARGET_MODE +static void ahd_run_tqinfifo(struct ahd_softc *ahd, int paused); +#endif +static void ahd_handle_hwerrint(struct ahd_softc *ahd); +static void ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat); +static void ahd_handle_scsiint(struct ahd_softc *ahd, + u_int intstat); + /************************ Sequencer Execution Control *************************/ void ahd_set_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) @@ -285,7 +297,7 @@ ahd_set_modes(struct ahd_softc *ahd, ahd ahd->dst_mode = dst; } -void +static void ahd_update_modes(struct ahd_softc *ahd) { ahd_mode_state mode_ptr; @@ -301,7 +313,7 @@ ahd_update_modes(struct ahd_softc *ahd) ahd_known_modes(ahd, src, dst); } -void +static void ahd_assert_modes(struct ahd_softc *ahd, ahd_mode srcmode, ahd_mode dstmode, const char *file, int line) { @@ -422,7 +434,7 @@ ahd_sg_setup(struct ahd_softc *ahd, stru } } -void +static void ahd_setup_scb_common(struct ahd_softc *ahd, struct scb *scb) { /* XXX Handle target mode SCBs. */ @@ -443,7 +455,7 @@ ahd_setup_scb_common(struct ahd_softc *a ahd_htole32(scb->sense_busaddr); } -void +static void ahd_setup_data_scb(struct ahd_softc *ahd, struct scb *scb) { /* @@ -480,7 +492,7 @@ ahd_setup_data_scb(struct ahd_softc *ahd scb->hscb->sgptr = ahd_htole32(scb->sg_list_busaddr|SG_FULL_RESID); } -void +static void ahd_setup_noxfer_scb(struct ahd_softc *ahd, struct scb *scb) { scb->hscb->sgptr = ahd_htole32(SG_LIST_NULL); @@ -489,7 +501,7 @@ ahd_setup_noxfer_scb(struct ahd_softc *a } /************************** Memory mapping routines ***************************/ -void * +static void * ahd_sg_bus_to_virt(struct ahd_softc *ahd, struct scb *scb, uint32_t sg_busaddr) { dma_addr_t sg_offset; @@ -499,7 +511,7 @@ ahd_sg_bus_to_virt(struct ahd_softc *ahd return ((uint8_t *)scb->sg_list + sg_offset); } -uint32_t +static uint32_t ahd_sg_virt_to_bus(struct ahd_softc *ahd, struct scb *scb, void *sg) { dma_addr_t sg_offset; @@ -511,7 +523,7 @@ ahd_sg_virt_to_bus(struct ahd_softc *ahd return (scb->sg_list_busaddr + sg_offset); } -void +static void ahd_sync_scb(struct ahd_softc *ahd, struct scb *scb, int op) { ahd_dmamap_sync(ahd, ahd->scb_data.hscb_dmat, @@ -532,7 +544,7 @@ ahd_sync_sglist(struct ahd_softc *ahd, s /*len*/ahd_sg_size(ahd) * scb->sg_count, op); } -void +static void ahd_sync_sense(struct ahd_softc *ahd, struct scb *scb, int op) { ahd_dmamap_sync(ahd, ahd->scb_data.sense_dmat, @@ -541,12 +553,14 @@ ahd_sync_sense(struct ahd_softc *ahd, st /*len*/AHD_SENSE_BUFSIZE, op); } -uint32_t +#ifdef AHD_TARGET_MODE +static uint32_t ahd_targetcmd_offset(struct ahd_softc *ahd, u_int index) { return (((uint8_t *)&ahd->targetcmds[index]) - (uint8_t *)ahd->qoutfifo); } +#endif /*********************** Miscelaneous Support Functions ***********************/ /* @@ -653,31 +667,35 @@ ahd_set_scbptr(struct ahd_softc *ahd, u_ ahd_outb(ahd, SCBPTR+1, (scbptr >> 8) & 0xFF); } -u_int +#if 0 /* unused */ +static u_int ahd_get_hnscb_qoff(struct ahd_softc *ahd) { return (ahd_inw_atomic(ahd, HNSCB_QOFF)); } +#endif -void +static void ahd_set_hnscb_qoff(struct ahd_softc *ahd, u_int value) { ahd_outw_atomic(ahd, HNSCB_QOFF, value); } -u_int +#if 0 /* unused */ +static u_int ahd_get_hescb_qoff(struct ahd_softc *ahd) { return (ahd_inb(ahd, HESCB_QOFF)); } +#endif -void +static void ahd_set_hescb_qoff(struct ahd_softc *ahd, u_int value) { ahd_outb(ahd, HESCB_QOFF, value); } -u_int +static u_int ahd_get_snscb_qoff(struct ahd_softc *ahd) { u_int oldvalue; @@ -688,35 +706,39 @@ ahd_get_snscb_qoff(struct ahd_softc *ahd return (oldvalue); } -void +static void ahd_set_snscb_qoff(struct ahd_softc *ahd, u_int value) { AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); ahd_outw(ahd, SNSCB_QOFF, value); } -u_int +#if 0 /* unused */ +static u_int ahd_get_sescb_qoff(struct ahd_softc *ahd) { AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); return (ahd_inb(ahd, SESCB_QOFF)); } +#endif -void +static void ahd_set_sescb_qoff(struct ahd_softc *ahd, u_int value) { AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); ahd_outb(ahd, SESCB_QOFF, value); } -u_int +#if 0 /* unused */ +static u_int ahd_get_sdscb_qoff(struct ahd_softc *ahd) { AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); return (ahd_inb(ahd, SDSCB_QOFF) | (ahd_inb(ahd, SDSCB_QOFF + 1) << 8)); } +#endif -void +static void ahd_set_sdscb_qoff(struct ahd_softc *ahd, u_int value) { AHD_ASSERT_MODES(ahd, AHD_MODE_CCHAN_MSK, AHD_MODE_CCHAN_MSK); @@ -756,14 +778,14 @@ ahd_inw_scbram(struct ahd_softc *ahd, u_ | (ahd_inb_scbram(ahd, offset+1) << 8)); } -uint32_t +static uint32_t ahd_inl_scbram(struct ahd_softc *ahd, u_int offset) { return (ahd_inw_scbram(ahd, offset) | (ahd_inw_scbram(ahd, offset+2) << 16)); } -uint64_t +static uint64_t ahd_inq_scbram(struct ahd_softc *ahd, u_int offset) { return (ahd_inl_scbram(ahd, offset) @@ -784,7 +806,7 @@ ahd_lookup_scb(struct ahd_softc *ahd, u_ return (scb); } -void +static void ahd_swap_with_next_hscb(struct ahd_softc *ahd, struct scb *scb) { struct hardware_scb *q_hscb; @@ -869,7 +891,7 @@ ahd_queue_scb(struct ahd_softc *ahd, str } /************************** Interrupt Processing ******************************/ -void +static void ahd_sync_qoutfifo(struct ahd_softc *ahd, int op) { ahd_dmamap_sync(ahd, ahd->shared_data_dmat, ahd->shared_data_map.dmamap, @@ -877,7 +899,7 @@ ahd_sync_qoutfifo(struct ahd_softc *ahd, /*len*/AHD_SCB_MAX * sizeof(struct ahd_completion), op); } -void +static void ahd_sync_tqinfifo(struct ahd_softc *ahd, int op) { #ifdef AHD_TARGET_MODE @@ -897,7 +919,7 @@ ahd_sync_tqinfifo(struct ahd_softc *ahd, */ #define AHD_RUN_QOUTFIFO 0x1 #define AHD_RUN_TQINFIFO 0x2 -u_int +static u_int ahd_check_cmdcmpltqueues(struct ahd_softc *ahd) { u_int retval; @@ -1640,7 +1662,7 @@ clrchn: * a copy of the first byte (little endian) of the sgptr * hscb field. */ -void +static void ahd_run_qoutfifo(struct ahd_softc *ahd) { struct ahd_completion *completion; @@ -1679,7 +1701,7 @@ ahd_run_qoutfifo(struct ahd_softc *ahd) } /************************* Interrupt Handling *********************************/ -void +static void ahd_handle_hwerrint(struct ahd_softc *ahd) { /* @@ -1753,7 +1775,7 @@ ahd_dump_sglist(struct scb *scb) } #endif /* AHD_DEBUG */ -void +static void ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) { u_int seqintcode; @@ -2365,7 +2387,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, ahd_unpause(ahd); } -void +static void ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) { struct scb *scb; @@ -8135,7 +8157,7 @@ ahd_qinfifo_count(struct ahd_softc *ahd) + ARRAY_SIZE(ahd->qinfifo) - wrap_qinpos); } -void +static void ahd_reset_cmds_pending(struct ahd_softc *ahd) { struct scb *scb; @@ -9660,7 +9682,7 @@ sized: } int -ahd_print_register(ahd_reg_parse_entry_t *table, u_int num_entries, +ahd_print_register(const ahd_reg_parse_entry_t *table, u_int num_entries, const char *name, u_int address, u_int value, u_int *cur_column, u_int wrap_point) { @@ -10651,7 +10673,7 @@ ahd_update_scsiid(struct ahd_softc *ahd, #endif } -void +static void ahd_run_tqinfifo(struct ahd_softc *ahd, int paused) { struct target_cmd *cmd; diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_inline.h linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_inline.h --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_inline.h 2007-10-14 15:02:44.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_inline.h 2007-10-14 15:05:07.000000000 +0100 @@ -66,10 +66,6 @@ static __inline void ahd_extract_mode_st void ahd_set_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst); -void ahd_update_modes(struct ahd_softc *ahd); -void ahd_assert_modes(struct ahd_softc *ahd, ahd_mode srcmode, - ahd_mode dstmode, const char *file, - int line); ahd_mode_state ahd_save_modes(struct ahd_softc *ahd); void ahd_restore_modes(struct ahd_softc *ahd, ahd_mode_state state); @@ -104,33 +100,12 @@ ahd_extract_mode_state(struct ahd_softc void *ahd_sg_setup(struct ahd_softc *ahd, struct scb *scb, void *sgptr, dma_addr_t addr, bus_size_t len, int last); -void ahd_setup_scb_common(struct ahd_softc *ahd, - struct scb *scb); -void ahd_setup_data_scb(struct ahd_softc *ahd, - struct scb *scb); -void ahd_setup_noxfer_scb(struct ahd_softc *ahd, - struct scb *scb); /************************** Memory mapping routines ***************************/ static __inline size_t ahd_sg_size(struct ahd_softc *ahd); -void * - ahd_sg_bus_to_virt(struct ahd_softc *ahd, - struct scb *scb, - uint32_t sg_busaddr); -uint32_t - ahd_sg_virt_to_bus(struct ahd_softc *ahd, - struct scb *scb, - void *sg); -void ahd_sync_scb(struct ahd_softc *ahd, - struct scb *scb, int op); void ahd_sync_sglist(struct ahd_softc *ahd, struct scb *scb, int op); -void ahd_sync_sense(struct ahd_softc *ahd, - struct scb *scb, int op); -uint32_t - ahd_targetcmd_offset(struct ahd_softc *ahd, - u_int index); static __inline size_t ahd_sg_size(struct ahd_softc *ahd) @@ -160,26 +135,10 @@ void ahd_outq(struct ahd_softc *ahd, u_i uint64_t value); u_int ahd_get_scbptr(struct ahd_softc *ahd); void ahd_set_scbptr(struct ahd_softc *ahd, u_int scbptr); -u_int ahd_get_hnscb_qoff(struct ahd_softc *ahd); -void ahd_set_hnscb_qoff(struct ahd_softc *ahd, u_int value); -u_int ahd_get_hescb_qoff(struct ahd_softc *ahd); -void ahd_set_hescb_qoff(struct ahd_softc *ahd, u_int value); -u_int ahd_get_snscb_qoff(struct ahd_softc *ahd); -void ahd_set_snscb_qoff(struct ahd_softc *ahd, u_int value); -u_int ahd_get_sescb_qoff(struct ahd_softc *ahd); -void ahd_set_sescb_qoff(struct ahd_softc *ahd, u_int value); -u_int ahd_get_sdscb_qoff(struct ahd_softc *ahd); -void ahd_set_sdscb_qoff(struct ahd_softc *ahd, u_int value); u_int ahd_inb_scbram(struct ahd_softc *ahd, u_int offset); u_int ahd_inw_scbram(struct ahd_softc *ahd, u_int offset); -uint32_t - ahd_inl_scbram(struct ahd_softc *ahd, u_int offset); -uint64_t - ahd_inq_scbram(struct ahd_softc *ahd, u_int offset); struct scb * ahd_lookup_scb(struct ahd_softc *ahd, u_int tag); -void ahd_swap_with_next_hscb(struct ahd_softc *ahd, - struct scb *scb); void ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb); static __inline uint8_t * @@ -212,9 +171,6 @@ ahd_get_sense_bufaddr(struct ahd_softc * } /************************** Interrupt Processing ******************************/ -void ahd_sync_qoutfifo(struct ahd_softc *ahd, int op); -void ahd_sync_tqinfifo(struct ahd_softc *ahd, int op); -u_int ahd_check_cmdcmpltqueues(struct ahd_softc *ahd); int ahd_intr(struct ahd_softc *ahd); #endif /* _AIC79XX_INLINE_H_ */ diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_osm.c linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_osm.c --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_osm.c 2007-10-14 15:02:44.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_osm.c 2007-10-14 15:05:07.000000000 +0100 @@ -388,7 +388,6 @@ ahd_delay(long usec) /***************************** Low Level I/O **********************************/ uint8_t ahd_inb(struct ahd_softc * ahd, long port); -uint16_t ahd_inw_atomic(struct ahd_softc * ahd, long port); void ahd_outb(struct ahd_softc * ahd, long port, uint8_t val); void ahd_outw_atomic(struct ahd_softc * ahd, long port, uint16_t val); @@ -411,7 +410,8 @@ ahd_inb(struct ahd_softc * ahd, long por return (x); } -uint16_t +#if 0 /* unused */ +static uint16_t ahd_inw_atomic(struct ahd_softc * ahd, long port) { uint8_t x; @@ -424,6 +424,7 @@ ahd_inw_atomic(struct ahd_softc * ahd, l mb(); return (x); } +#endif void ahd_outb(struct ahd_softc * ahd, long port, uint8_t val) diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_osm.h linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_osm.h --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_osm.h 2007-10-14 15:02:44.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_osm.h 2007-10-14 15:05:07.000000000 +0100 @@ -374,7 +374,6 @@ void ahd_delay(long); /***************************** Low Level I/O **********************************/ uint8_t ahd_inb(struct ahd_softc * ahd, long port); -uint16_t ahd_inw_atomic(struct ahd_softc * ahd, long port); void ahd_outb(struct ahd_softc * ahd, long port, uint8_t val); void ahd_outw_atomic(struct ahd_softc * ahd, long port, uint16_t val); diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_pci.c linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_pci.c --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_pci.c 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_pci.c 2007-10-14 15:05:07.000000000 +0100 @@ -97,7 +97,7 @@ static ahd_device_setup_t ahd_aic7901A_s static ahd_device_setup_t ahd_aic7902_setup; static ahd_device_setup_t ahd_aic790X_setup; -static struct ahd_pci_identity ahd_pci_ident_table [] = +static struct ahd_pci_identity ahd_pci_ident_table[] = { /* aic7901 based controllers */ { diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped 2007-10-14 15:05:07.000000000 +0100 @@ -12,6 +12,8 @@ typedef struct ahd_reg_parse_entry { uint8_t mask; } ahd_reg_parse_entry_t; +#if 0 /* unused */ + #if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_mode_ptr_print; #else @@ -20,13 +22,6 @@ ahd_reg_print_t ahd_mode_ptr_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_intstat_print; -#else -#define ahd_intstat_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "INTSTAT", 0x01, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_seqintcode_print; #else #define ahd_seqintcode_print(regvalue, cur_col, wrap) \ @@ -76,20 +71,6 @@ ahd_reg_print_t ahd_hescb_qoff_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_hs_mailbox_print; -#else -#define ahd_hs_mailbox_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "HS_MAILBOX", 0x0b, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_seqintstat_print; -#else -#define ahd_seqintstat_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SEQINTSTAT", 0x0c, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_clrseqintstat_print; #else #define ahd_clrseqintstat_print(regvalue, cur_col, wrap) \ @@ -132,20 +113,6 @@ ahd_reg_print_t ahd_qoff_ctlsta_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_intctl_print; -#else -#define ahd_intctl_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "INTCTL", 0x18, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_dfcntrl_print; -#else -#define ahd_dfcntrl_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "DFCNTRL", 0x19, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_dscommand0_print; #else #define ahd_dscommand0_print(regvalue, cur_col, wrap) \ @@ -153,20 +120,6 @@ ahd_reg_print_t ahd_dscommand0_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_dfstatus_print; -#else -#define ahd_dfstatus_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "DFSTATUS", 0x1a, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_sg_cache_shadow_print; -#else -#define ahd_sg_cache_shadow_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SG_CACHE_SHADOW", 0x1b, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_arbctl_print; #else #define ahd_arbctl_print(regvalue, cur_col, wrap) \ @@ -391,20 +344,6 @@ ahd_reg_print_t ahd_scsbist1_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_scsiseq0_print; -#else -#define ahd_scsiseq0_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SCSISEQ0", 0x3a, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_scsiseq1_print; -#else -#define ahd_scsiseq1_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SCSISEQ1", 0x3b, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_sxfrctl0_print; #else #define ahd_sxfrctl0_print(regvalue, cur_col, wrap) \ @@ -447,13 +386,6 @@ ahd_reg_print_t ahd_sxfrctl2_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_dffstat_print; -#else -#define ahd_dffstat_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "DFFSTAT", 0x3f, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_scsisigo_print; #else #define ahd_scsisigo_print(regvalue, cur_col, wrap) \ @@ -468,20 +400,6 @@ ahd_reg_print_t ahd_multargid_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_scsisigi_print; -#else -#define ahd_scsisigi_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SCSISIGI", 0x41, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_scsiphase_print; -#else -#define ahd_scsiphase_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SCSIPHASE", 0x42, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_scsidat0_img_print; #else #define ahd_scsidat0_img_print(regvalue, cur_col, wrap) \ @@ -496,13 +414,6 @@ ahd_reg_print_t ahd_scsidat_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_scsibus_print; -#else -#define ahd_scsibus_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SCSIBUS", 0x46, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_targidin_print; #else #define ahd_targidin_print(regvalue, cur_col, wrap) \ @@ -510,13 +421,6 @@ ahd_reg_print_t ahd_targidin_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_selid_print; -#else -#define ahd_selid_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SELID", 0x49, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_optionmode_print; #else #define ahd_optionmode_print(regvalue, cur_col, wrap) \ @@ -538,20 +442,6 @@ ahd_reg_print_t ahd_clrsint0_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_sstat0_print; -#else -#define ahd_sstat0_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SSTAT0", 0x4b, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_simode0_print; -#else -#define ahd_simode0_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SIMODE0", 0x4b, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_clrsint1_print; #else #define ahd_clrsint1_print(regvalue, cur_col, wrap) \ @@ -559,20 +449,6 @@ ahd_reg_print_t ahd_clrsint1_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_sstat1_print; -#else -#define ahd_sstat1_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SSTAT1", 0x4c, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_sstat2_print; -#else -#define ahd_sstat2_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SSTAT2", 0x4d, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_simode2_print; #else #define ahd_simode2_print(regvalue, cur_col, wrap) \ @@ -587,13 +463,6 @@ ahd_reg_print_t ahd_clrsint2_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_perrdiag_print; -#else -#define ahd_perrdiag_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "PERRDIAG", 0x4e, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_lqistate_print; #else #define ahd_lqistate_print(regvalue, cur_col, wrap) \ @@ -601,13 +470,6 @@ ahd_reg_print_t ahd_lqistate_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_soffcnt_print; -#else -#define ahd_soffcnt_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SOFFCNT", 0x4f, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_lqostate_print; #else #define ahd_lqostate_print(regvalue, cur_col, wrap) \ @@ -615,13 +477,6 @@ ahd_reg_print_t ahd_lqostate_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_lqistat0_print; -#else -#define ahd_lqistat0_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "LQISTAT0", 0x50, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_clrlqiint0_print; #else #define ahd_clrlqiint0_print(regvalue, cur_col, wrap) \ @@ -643,13 +498,6 @@ ahd_reg_print_t ahd_lqimode1_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_lqistat1_print; -#else -#define ahd_lqistat1_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "LQISTAT1", 0x51, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_clrlqiint1_print; #else #define ahd_clrlqiint1_print(regvalue, cur_col, wrap) \ @@ -657,20 +505,6 @@ ahd_reg_print_t ahd_clrlqiint1_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_lqistat2_print; -#else -#define ahd_lqistat2_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "LQISTAT2", 0x52, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_sstat3_print; -#else -#define ahd_sstat3_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SSTAT3", 0x53, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_simode3_print; #else #define ahd_simode3_print(regvalue, cur_col, wrap) \ @@ -685,13 +519,6 @@ ahd_reg_print_t ahd_clrsint3_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_lqostat0_print; -#else -#define ahd_lqostat0_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "LQOSTAT0", 0x54, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_clrlqoint0_print; #else #define ahd_clrlqoint0_print(regvalue, cur_col, wrap) \ @@ -713,13 +540,6 @@ ahd_reg_print_t ahd_lqomode1_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_lqostat1_print; -#else -#define ahd_lqostat1_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "LQOSTAT1", 0x55, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_clrlqoint1_print; #else #define ahd_clrlqoint1_print(regvalue, cur_col, wrap) \ @@ -727,13 +547,6 @@ ahd_reg_print_t ahd_clrlqoint1_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_lqostat2_print; -#else -#define ahd_lqostat2_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "LQOSTAT2", 0x56, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_os_space_cnt_print; #else #define ahd_os_space_cnt_print(regvalue, cur_col, wrap) \ @@ -741,13 +554,6 @@ ahd_reg_print_t ahd_os_space_cnt_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_simode1_print; -#else -#define ahd_simode1_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SIMODE1", 0x57, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_gsfifo_print; #else #define ahd_gsfifo_print(regvalue, cur_col, wrap) \ @@ -755,13 +561,6 @@ ahd_reg_print_t ahd_gsfifo_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_dffsxfrctl_print; -#else -#define ahd_dffsxfrctl_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "DFFSXFRCTL", 0x5a, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_lqoscsctl_print; #else #define ahd_lqoscsctl_print(regvalue, cur_col, wrap) \ @@ -783,13 +582,6 @@ ahd_reg_print_t ahd_clrseqintsrc_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_seqintsrc_print; -#else -#define ahd_seqintsrc_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SEQINTSRC", 0x5b, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_currscb_print; #else #define ahd_currscb_print(regvalue, cur_col, wrap) \ @@ -797,20 +589,6 @@ ahd_reg_print_t ahd_currscb_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_seqimode_print; -#else -#define ahd_seqimode_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SEQIMODE", 0x5c, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_mdffstat_print; -#else -#define ahd_mdffstat_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "MDFFSTAT", 0x5d, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_crccontrol_print; #else #define ahd_crccontrol_print(regvalue, cur_col, wrap) \ @@ -972,13 +750,6 @@ ahd_reg_print_t ahd_xsig_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_seloid_print; -#else -#define ahd_seloid_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SELOID", 0x6b, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_pll400ctl0_print; #else #define ahd_pll400ctl0_print(regvalue, cur_col, wrap) \ @@ -1448,13 +1219,6 @@ ahd_reg_print_t ahd_reg_isr_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_sg_state_print; -#else -#define ahd_sg_state_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SG_STATE", 0xa6, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_msipcistat_print; #else #define ahd_msipcistat_print(regvalue, cur_col, wrap) \ @@ -1525,20 +1289,6 @@ ahd_reg_print_t ahd_cmc_rambist_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_ccscbctl_print; -#else -#define ahd_ccscbctl_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "CCSCBCTL", 0xad, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_ccsgctl_print; -#else -#define ahd_ccsgctl_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "CCSGCTL", 0xad, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_ccsgram_print; #else #define ahd_ccsgram_print(regvalue, cur_col, wrap) \ @@ -1763,14 +1513,7 @@ ahd_reg_print_t ahd_ovlyaddr_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_seqctl0_print; -#else -#define ahd_seqctl0_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SEQCTL0", 0xd6, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_seqctl1_print; +ahd_reg_print_t ahd_seqctl1_print; #else #define ahd_seqctl1_print(regvalue, cur_col, wrap) \ ahd_print_register(NULL, 0, "SEQCTL1", 0xd7, regvalue, cur_col, wrap) @@ -1784,13 +1527,6 @@ ahd_reg_print_t ahd_flags_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_seqintctl_print; -#else -#define ahd_seqintctl_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SEQINTCTL", 0xd9, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_seqram_print; #else #define ahd_seqram_print(regvalue, cur_col, wrap) \ @@ -2008,27 +1744,6 @@ ahd_reg_print_t ahd_complete_on_qfreeze_ #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_qfreeze_count_print; -#else -#define ahd_qfreeze_count_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "QFREEZE_COUNT", 0x132, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_kernel_qfreeze_count_print; -#else -#define ahd_kernel_qfreeze_count_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "KERNEL_QFREEZE_COUNT", 0x134, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_saved_mode_print; -#else -#define ahd_saved_mode_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SAVED_MODE", 0x136, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_msg_out_print; #else #define ahd_msg_out_print(regvalue, cur_col, wrap) \ @@ -2043,13 +1758,6 @@ ahd_reg_print_t ahd_dmaparams_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_seq_flags_print; -#else -#define ahd_seq_flags_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SEQ_FLAGS", 0x139, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_saved_scsiid_print; #else #define ahd_saved_scsiid_print(regvalue, cur_col, wrap) \ @@ -2064,13 +1772,6 @@ ahd_reg_print_t ahd_saved_lun_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_lastphase_print; -#else -#define ahd_lastphase_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "LASTPHASE", 0x13c, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_qoutfifo_entry_valid_tag_print; #else #define ahd_qoutfifo_entry_valid_tag_print(regvalue, cur_col, wrap) \ @@ -2141,13 +1842,6 @@ ahd_reg_print_t ahd_initiator_tag_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_seq_flags2_print; -#else -#define ahd_seq_flags2_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SEQ_FLAGS2", 0x14d, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_allocfifo_scbptr_print; #else #define ahd_allocfifo_scbptr_print(regvalue, cur_col, wrap) \ @@ -2204,20 +1898,6 @@ ahd_reg_print_t ahd_cmdsize_table_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_mk_message_scb_print; -#else -#define ahd_mk_message_scb_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "MK_MESSAGE_SCB", 0x160, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_mk_message_scsiid_print; -#else -#define ahd_mk_message_scsiid_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "MK_MESSAGE_SCSIID", 0x162, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_scb_base_print; #else #define ahd_scb_base_print(regvalue, cur_col, wrap) \ @@ -2281,20 +1961,6 @@ ahd_reg_print_t ahd_scb_tag_print; #endif #if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_scb_control_print; -#else -#define ahd_scb_control_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SCB_CONTROL", 0x192, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahd_reg_print_t ahd_scb_scsiid_print; -#else -#define ahd_scb_scsiid_print(regvalue, cur_col, wrap) \ - ahd_print_register(NULL, 0, "SCB_SCSIID", 0x193, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahd_reg_print_t ahd_scb_lun_print; #else #define ahd_scb_lun_print(regvalue, cur_col, wrap) \ @@ -2378,6 +2044,344 @@ ahd_reg_print_t ahd_scb_disconnected_lis ahd_print_register(NULL, 0, "SCB_DISCONNECTED_LISTS", 0x1b8, regvalue, cur_col, wrap) #endif +#endif /* unused */ + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_intstat_print; +#else +#define ahd_intstat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "INTSTAT", 0x01, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_hs_mailbox_print; +#else +#define ahd_hs_mailbox_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "HS_MAILBOX", 0x0b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seqintstat_print; +#else +#define ahd_seqintstat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SEQINTSTAT", 0x0c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_intctl_print; +#else +#define ahd_intctl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "INTCTL", 0x18, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dfcntrl_print; +#else +#define ahd_dfcntrl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DFCNTRL", 0x19, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dfstatus_print; +#else +#define ahd_dfstatus_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DFSTATUS", 0x1a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sg_cache_shadow_print; +#else +#define ahd_sg_cache_shadow_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SG_CACHE_SHADOW", 0x1b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsiseq0_print; +#else +#define ahd_scsiseq0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSISEQ0", 0x3a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsiseq1_print; +#else +#define ahd_scsiseq1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSISEQ1", 0x3b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dffstat_print; +#else +#define ahd_dffstat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DFFSTAT", 0x3f, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsisigi_print; +#else +#define ahd_scsisigi_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSISIGI", 0x41, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsiphase_print; +#else +#define ahd_scsiphase_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSIPHASE", 0x42, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scsibus_print; +#else +#define ahd_scsibus_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCSIBUS", 0x46, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_selid_print; +#else +#define ahd_selid_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SELID", 0x49, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sstat0_print; +#else +#define ahd_sstat0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SSTAT0", 0x4b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_simode0_print; +#else +#define ahd_simode0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SIMODE0", 0x4b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sstat1_print; +#else +#define ahd_sstat1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SSTAT1", 0x4c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sstat2_print; +#else +#define ahd_sstat2_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SSTAT2", 0x4d, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_perrdiag_print; +#else +#define ahd_perrdiag_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "PERRDIAG", 0x4e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_soffcnt_print; +#else +#define ahd_soffcnt_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SOFFCNT", 0x4f, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqistat0_print; +#else +#define ahd_lqistat0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQISTAT0", 0x50, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqistat1_print; +#else +#define ahd_lqistat1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQISTAT1", 0x51, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqistat2_print; +#else +#define ahd_lqistat2_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQISTAT2", 0x52, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sstat3_print; +#else +#define ahd_sstat3_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SSTAT3", 0x53, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqostat0_print; +#else +#define ahd_lqostat0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQOSTAT0", 0x54, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqostat1_print; +#else +#define ahd_lqostat1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQOSTAT1", 0x55, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lqostat2_print; +#else +#define ahd_lqostat2_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LQOSTAT2", 0x56, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_simode1_print; +#else +#define ahd_simode1_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SIMODE1", 0x57, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_dffsxfrctl_print; +#else +#define ahd_dffsxfrctl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "DFFSXFRCTL", 0x5a, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seqintsrc_print; +#else +#define ahd_seqintsrc_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SEQINTSRC", 0x5b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seqimode_print; +#else +#define ahd_seqimode_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SEQIMODE", 0x5c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_mdffstat_print; +#else +#define ahd_mdffstat_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "MDFFSTAT", 0x5d, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seloid_print; +#else +#define ahd_seloid_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SELOID", 0x6b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_sg_state_print; +#else +#define ahd_sg_state_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SG_STATE", 0xa6, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_ccscbctl_print; +#else +#define ahd_ccscbctl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CCSCBCTL", 0xad, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_ccsgctl_print; +#else +#define ahd_ccsgctl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "CCSGCTL", 0xad, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seqctl0_print; +#else +#define ahd_seqctl0_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SEQCTL0", 0xd6, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seqintctl_print; +#else +#define ahd_seqintctl_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SEQINTCTL", 0xd9, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_qfreeze_count_print; +#else +#define ahd_qfreeze_count_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "QFREEZE_COUNT", 0x132, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_kernel_qfreeze_count_print; +#else +#define ahd_kernel_qfreeze_count_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "KERNEL_QFREEZE_COUNT", 0x134, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_saved_mode_print; +#else +#define ahd_saved_mode_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SAVED_MODE", 0x136, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seq_flags_print; +#else +#define ahd_seq_flags_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SEQ_FLAGS", 0x139, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_lastphase_print; +#else +#define ahd_lastphase_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "LASTPHASE", 0x13c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_seq_flags2_print; +#else +#define ahd_seq_flags2_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SEQ_FLAGS2", 0x14d, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_mk_message_scb_print; +#else +#define ahd_mk_message_scb_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "MK_MESSAGE_SCB", 0x160, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_mk_message_scsiid_print; +#else +#define ahd_mk_message_scsiid_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "MK_MESSAGE_SCSIID", 0x162, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scb_control_print; +#else +#define ahd_scb_control_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCB_CONTROL", 0x192, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahd_reg_print_t ahd_scb_scsiid_print; +#else +#define ahd_scb_scsiid_print(regvalue, cur_col, wrap) \ + ahd_print_register(NULL, 0, "SCB_SCSIID", 0x193, regvalue, cur_col, wrap) +#endif + #define MODE_PTR 0x00 #define DST_MODE 0x70 diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped 2007-10-14 15:05:07.000000000 +0100 @@ -8,7 +8,9 @@ #include "aic79xx_osm.h" -static ahd_reg_parse_entry_t MODE_PTR_parse_table[] = { +#if 0 /* unused */ + +static const ahd_reg_parse_entry_t MODE_PTR_parse_table[] = { { "SRC_MODE", 0x07, 0x07 }, { "DST_MODE", 0x70, 0x70 } }; @@ -20,26 +22,7 @@ ahd_mode_ptr_print(u_int regvalue, u_int 0x00, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t INTSTAT_parse_table[] = { - { "SPLTINT", 0x01, 0x01 }, - { "CMDCMPLT", 0x02, 0x02 }, - { "SEQINT", 0x04, 0x04 }, - { "SCSIINT", 0x08, 0x08 }, - { "PCIINT", 0x10, 0x10 }, - { "SWTMINT", 0x20, 0x20 }, - { "BRKADRINT", 0x40, 0x40 }, - { "HWERRINT", 0x80, 0x80 }, - { "INT_PEND", 0xff, 0xff } -}; - -int -ahd_intstat_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(INTSTAT_parse_table, 9, "INTSTAT", - 0x01, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SEQINTCODE_parse_table[] = { +static const ahd_reg_parse_entry_t SEQINTCODE_parse_table[] = { { "NO_SEQINT", 0x00, 0xff }, { "BAD_PHASE", 0x01, 0xff }, { "SEND_REJECT", 0x02, 0xff }, @@ -76,7 +59,7 @@ ahd_seqintcode_print(u_int regvalue, u_i 0x02, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CLRINT_parse_table[] = { +static const ahd_reg_parse_entry_t CLRINT_parse_table[] = { { "CLRSPLTINT", 0x01, 0x01 }, { "CLRCMDINT", 0x02, 0x02 }, { "CLRSEQINT", 0x04, 0x04 }, @@ -94,7 +77,7 @@ ahd_clrint_print(u_int regvalue, u_int * 0x03, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t ERROR_parse_table[] = { +static const ahd_reg_parse_entry_t ERROR_parse_table[] = { { "DSCTMOUT", 0x02, 0x02 }, { "ILLOPCODE", 0x04, 0x04 }, { "SQPARERR", 0x08, 0x08 }, @@ -111,7 +94,7 @@ ahd_error_print(u_int regvalue, u_int *c 0x04, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CLRERR_parse_table[] = { +static const ahd_reg_parse_entry_t CLRERR_parse_table[] = { { "CLRDSCTMOUT", 0x02, 0x02 }, { "CLRILLOPCODE", 0x04, 0x04 }, { "CLRSQPARERR", 0x08, 0x08 }, @@ -128,7 +111,7 @@ ahd_clrerr_print(u_int regvalue, u_int * 0x04, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t HCNTRL_parse_table[] = { +static const ahd_reg_parse_entry_t HCNTRL_parse_table[] = { { "CHIPRST", 0x01, 0x01 }, { "CHIPRSTACK", 0x01, 0x01 }, { "INTEN", 0x02, 0x02 }, @@ -160,34 +143,7 @@ ahd_hescb_qoff_print(u_int regvalue, u_i 0x08, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t HS_MAILBOX_parse_table[] = { - { "ENINT_COALESCE", 0x40, 0x40 }, - { "HOST_TQINPOS", 0x80, 0x80 } -}; - -int -ahd_hs_mailbox_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(HS_MAILBOX_parse_table, 2, "HS_MAILBOX", - 0x0b, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SEQINTSTAT_parse_table[] = { - { "SEQ_SPLTINT", 0x01, 0x01 }, - { "SEQ_PCIINT", 0x02, 0x02 }, - { "SEQ_SCSIINT", 0x04, 0x04 }, - { "SEQ_SEQINT", 0x08, 0x08 }, - { "SEQ_SWTMRTO", 0x10, 0x10 } -}; - -int -ahd_seqintstat_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SEQINTSTAT_parse_table, 5, "SEQINTSTAT", - 0x0c, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t CLRSEQINTSTAT_parse_table[] = { +static const ahd_reg_parse_entry_t CLRSEQINTSTAT_parse_table[] = { { "CLRSEQ_SPLTINT", 0x01, 0x01 }, { "CLRSEQ_PCIINT", 0x02, 0x02 }, { "CLRSEQ_SCSIINT", 0x04, 0x04 }, @@ -230,7 +186,7 @@ ahd_sdscb_qoff_print(u_int regvalue, u_i 0x14, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t QOFF_CTLSTA_parse_table[] = { +static const ahd_reg_parse_entry_t QOFF_CTLSTA_parse_table[] = { { "SCB_QSIZE_4", 0x00, 0x0f }, { "SCB_QSIZE_8", 0x01, 0x0f }, { "SCB_QSIZE_16", 0x02, 0x0f }, @@ -258,46 +214,7 @@ ahd_qoff_ctlsta_print(u_int regvalue, u_ 0x16, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t INTCTL_parse_table[] = { - { "SPLTINTEN", 0x01, 0x01 }, - { "SEQINTEN", 0x02, 0x02 }, - { "SCSIINTEN", 0x04, 0x04 }, - { "PCIINTEN", 0x08, 0x08 }, - { "AUTOCLRCMDINT", 0x10, 0x10 }, - { "SWTIMER_START", 0x20, 0x20 }, - { "SWTMINTEN", 0x40, 0x40 }, - { "SWTMINTMASK", 0x80, 0x80 } -}; - -int -ahd_intctl_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(INTCTL_parse_table, 8, "INTCTL", - 0x18, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t DFCNTRL_parse_table[] = { - { "DIRECTIONEN", 0x01, 0x01 }, - { "FIFOFLUSH", 0x02, 0x02 }, - { "FIFOFLUSHACK", 0x02, 0x02 }, - { "DIRECTION", 0x04, 0x04 }, - { "DIRECTIONACK", 0x04, 0x04 }, - { "HDMAEN", 0x08, 0x08 }, - { "HDMAENACK", 0x08, 0x08 }, - { "SCSIEN", 0x20, 0x20 }, - { "SCSIENACK", 0x20, 0x20 }, - { "SCSIENWRDIS", 0x40, 0x40 }, - { "PRELOADEN", 0x80, 0x80 } -}; - -int -ahd_dfcntrl_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(DFCNTRL_parse_table, 11, "DFCNTRL", - 0x19, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t DSCOMMAND0_parse_table[] = { +static const ahd_reg_parse_entry_t DSCOMMAND0_parse_table[] = { { "CIOPARCKEN", 0x01, 0x01 }, { "DISABLE_TWATE", 0x02, 0x02 }, { "EXTREQLCK", 0x10, 0x10 }, @@ -313,38 +230,7 @@ ahd_dscommand0_print(u_int regvalue, u_i 0x19, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DFSTATUS_parse_table[] = { - { "FIFOEMP", 0x01, 0x01 }, - { "FIFOFULL", 0x02, 0x02 }, - { "DFTHRESH", 0x04, 0x04 }, - { "HDONE", 0x08, 0x08 }, - { "MREQPEND", 0x10, 0x10 }, - { "PKT_PRELOAD_AVAIL", 0x40, 0x40 }, - { "PRELOAD_AVAIL", 0x80, 0x80 } -}; - -int -ahd_dfstatus_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(DFSTATUS_parse_table, 7, "DFSTATUS", - 0x1a, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SG_CACHE_SHADOW_parse_table[] = { - { "LAST_SEG_DONE", 0x01, 0x01 }, - { "LAST_SEG", 0x02, 0x02 }, - { "ODD_SEG", 0x04, 0x04 }, - { "SG_ADDR_MASK", 0xf8, 0xf8 } -}; - -int -ahd_sg_cache_shadow_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SG_CACHE_SHADOW_parse_table, 4, "SG_CACHE_SHADOW", - 0x1b, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t ARBCTL_parse_table[] = { +static const ahd_reg_parse_entry_t ARBCTL_parse_table[] = { { "USE_TIME", 0x07, 0x07 }, { "RETRY_SWEN", 0x08, 0x08 }, { "RESET_HARB", 0x80, 0x80 } @@ -357,7 +243,7 @@ ahd_arbctl_print(u_int regvalue, u_int * 0x1b, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SG_CACHE_PRE_parse_table[] = { +static const ahd_reg_parse_entry_t SG_CACHE_PRE_parse_table[] = { { "LAST_SEG", 0x02, 0x02 }, { "ODD_SEG", 0x04, 0x04 }, { "SG_ADDR_MASK", 0xf8, 0xf8 } @@ -489,7 +375,7 @@ ahd_shortthresh_print(u_int regvalue, u_ 0x2f, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LUNLEN_parse_table[] = { +static const ahd_reg_parse_entry_t LUNLEN_parse_table[] = { { "ILUNLEN", 0x0f, 0x0f }, { "TLUNLEN", 0xf0, 0xf0 } }; @@ -550,7 +436,7 @@ ahd_cmdrsvd0_print(u_int regvalue, u_int 0x37, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQCTL0_parse_table[] = { +static const ahd_reg_parse_entry_t LQCTL0_parse_table[] = { { "LQ0INITGCLT", 0x03, 0x03 }, { "LQ0TARGCLT", 0x0c, 0x0c }, { "LQIINITGCLT", 0x30, 0x30 }, @@ -564,7 +450,7 @@ ahd_lqctl0_print(u_int regvalue, u_int * 0x38, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQCTL1_parse_table[] = { +static const ahd_reg_parse_entry_t LQCTL1_parse_table[] = { { "ABORTPENDING", 0x01, 0x01 }, { "SINGLECMD", 0x02, 0x02 }, { "PCI2PCI", 0x04, 0x04 } @@ -577,7 +463,7 @@ ahd_lqctl1_print(u_int regvalue, u_int * 0x38, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCSBIST0_parse_table[] = { +static const ahd_reg_parse_entry_t SCSBIST0_parse_table[] = { { "OSBISTRUN", 0x01, 0x01 }, { "OSBISTDONE", 0x02, 0x02 }, { "OSBISTERR", 0x04, 0x04 }, @@ -593,7 +479,7 @@ ahd_scsbist0_print(u_int regvalue, u_int 0x39, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQCTL2_parse_table[] = { +static const ahd_reg_parse_entry_t LQCTL2_parse_table[] = { { "LQOPAUSE", 0x01, 0x01 }, { "LQOTOIDLE", 0x02, 0x02 }, { "LQOCONTINUE", 0x04, 0x04 }, @@ -611,7 +497,7 @@ ahd_lqctl2_print(u_int regvalue, u_int * 0x39, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCSBIST1_parse_table[] = { +static const ahd_reg_parse_entry_t SCSBIST1_parse_table[] = { { "NTBISTRUN", 0x01, 0x01 }, { "NTBISTDONE", 0x02, 0x02 }, { "NTBISTERR", 0x04, 0x04 } @@ -624,38 +510,7 @@ ahd_scsbist1_print(u_int regvalue, u_int 0x3a, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCSISEQ0_parse_table[] = { - { "SCSIRSTO", 0x01, 0x01 }, - { "FORCEBUSFREE", 0x10, 0x10 }, - { "ENARBO", 0x20, 0x20 }, - { "ENSELO", 0x40, 0x40 }, - { "TEMODEO", 0x80, 0x80 } -}; - -int -ahd_scsiseq0_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SCSISEQ0_parse_table, 5, "SCSISEQ0", - 0x3a, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SCSISEQ1_parse_table[] = { - { "ALTSTIM", 0x01, 0x01 }, - { "ENAUTOATNP", 0x02, 0x02 }, - { "MANUALP", 0x0c, 0x0c }, - { "ENRSELI", 0x10, 0x10 }, - { "ENSELI", 0x20, 0x20 }, - { "MANUALCTL", 0x40, 0x40 } -}; - -int -ahd_scsiseq1_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SCSISEQ1_parse_table, 6, "SCSISEQ1", - 0x3b, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SXFRCTL0_parse_table[] = { +static const ahd_reg_parse_entry_t SXFRCTL0_parse_table[] = { { "SPIOEN", 0x08, 0x08 }, { "BIOSCANCELEN", 0x10, 0x10 }, { "DFPEXP", 0x40, 0x40 }, @@ -683,7 +538,7 @@ ahd_businitid_print(u_int regvalue, u_in 0x3c, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SXFRCTL1_parse_table[] = { +static const ahd_reg_parse_entry_t SXFRCTL1_parse_table[] = { { "STPWEN", 0x01, 0x01 }, { "ACTNEGEN", 0x02, 0x02 }, { "ENSTIMER", 0x04, 0x04 }, @@ -707,7 +562,7 @@ ahd_bustargid_print(u_int regvalue, u_in 0x3e, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SXFRCTL2_parse_table[] = { +static const ahd_reg_parse_entry_t SXFRCTL2_parse_table[] = { { "ASU", 0x07, 0x07 }, { "CMDDMAEN", 0x08, 0x08 }, { "AUTORSTDIS", 0x10, 0x10 } @@ -720,23 +575,7 @@ ahd_sxfrctl2_print(u_int regvalue, u_int 0x3e, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DFFSTAT_parse_table[] = { - { "CURRFIFO_0", 0x00, 0x03 }, - { "CURRFIFO_1", 0x01, 0x03 }, - { "CURRFIFO_NONE", 0x03, 0x03 }, - { "FIFO0FREE", 0x10, 0x10 }, - { "FIFO1FREE", 0x20, 0x20 }, - { "CURRFIFO", 0x03, 0x03 } -}; - -int -ahd_dffstat_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(DFFSTAT_parse_table, 6, "DFFSTAT", - 0x3f, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SCSISIGO_parse_table[] = { +static const ahd_reg_parse_entry_t SCSISIGO_parse_table[] = { { "P_DATAOUT", 0x00, 0xe0 }, { "P_DATAOUT_DT", 0x20, 0xe0 }, { "P_DATAIN", 0x40, 0xe0 }, @@ -770,50 +609,6 @@ ahd_multargid_print(u_int regvalue, u_in 0x40, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCSISIGI_parse_table[] = { - { "P_DATAOUT", 0x00, 0xe0 }, - { "P_DATAOUT_DT", 0x20, 0xe0 }, - { "P_DATAIN", 0x40, 0xe0 }, - { "P_DATAIN_DT", 0x60, 0xe0 }, - { "P_COMMAND", 0x80, 0xe0 }, - { "P_MESGOUT", 0xa0, 0xe0 }, - { "P_STATUS", 0xc0, 0xe0 }, - { "P_MESGIN", 0xe0, 0xe0 }, - { "ACKI", 0x01, 0x01 }, - { "REQI", 0x02, 0x02 }, - { "BSYI", 0x04, 0x04 }, - { "SELI", 0x08, 0x08 }, - { "ATNI", 0x10, 0x10 }, - { "MSGI", 0x20, 0x20 }, - { "IOI", 0x40, 0x40 }, - { "CDI", 0x80, 0x80 }, - { "PHASE_MASK", 0xe0, 0xe0 } -}; - -int -ahd_scsisigi_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SCSISIGI_parse_table, 17, "SCSISIGI", - 0x41, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SCSIPHASE_parse_table[] = { - { "DATA_OUT_PHASE", 0x01, 0x03 }, - { "DATA_IN_PHASE", 0x02, 0x03 }, - { "DATA_PHASE_MASK", 0x03, 0x03 }, - { "MSG_OUT_PHASE", 0x04, 0x04 }, - { "MSG_IN_PHASE", 0x08, 0x08 }, - { "COMMAND_PHASE", 0x10, 0x10 }, - { "STATUS_PHASE", 0x20, 0x20 } -}; - -int -ahd_scsiphase_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SCSIPHASE_parse_table, 7, "SCSIPHASE", - 0x42, regvalue, cur_col, wrap)); -} - int ahd_scsidat0_img_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -828,38 +623,7 @@ ahd_scsidat_print(u_int regvalue, u_int 0x44, regvalue, cur_col, wrap)); } -int -ahd_scsibus_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(NULL, 0, "SCSIBUS", - 0x46, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t TARGIDIN_parse_table[] = { - { "TARGID", 0x0f, 0x0f }, - { "CLKOUT", 0x80, 0x80 } -}; - -int -ahd_targidin_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(TARGIDIN_parse_table, 2, "TARGIDIN", - 0x48, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SELID_parse_table[] = { - { "ONEBIT", 0x08, 0x08 }, - { "SELID_MASK", 0xf0, 0xf0 } -}; - -int -ahd_selid_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SELID_parse_table, 2, "SELID", - 0x49, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t OPTIONMODE_parse_table[] = { +static const ahd_reg_parse_entry_t OPTIONMODE_parse_table[] = { { "AUTO_MSGOUT_DE", 0x02, 0x02 }, { "ENDGFORMCHK", 0x04, 0x04 }, { "BUSFREEREV", 0x10, 0x10 }, @@ -876,7 +640,7 @@ ahd_optionmode_print(u_int regvalue, u_i 0x4a, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SBLKCTL_parse_table[] = { +static const ahd_reg_parse_entry_t SBLKCTL_parse_table[] = { { "SELWIDE", 0x02, 0x02 }, { "ENAB20", 0x04, 0x04 }, { "ENAB40", 0x08, 0x08 }, @@ -891,7 +655,7 @@ ahd_sblkctl_print(u_int regvalue, u_int 0x4a, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CLRSINT0_parse_table[] = { +static const ahd_reg_parse_entry_t CLRSINT0_parse_table[] = { { "CLRARBDO", 0x01, 0x01 }, { "CLRSPIORDY", 0x02, 0x02 }, { "CLROVERRUN", 0x04, 0x04 }, @@ -908,110 +672,32 @@ ahd_clrsint0_print(u_int regvalue, u_int 0x4b, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SSTAT0_parse_table[] = { - { "ARBDO", 0x01, 0x01 }, - { "SPIORDY", 0x02, 0x02 }, - { "OVERRUN", 0x04, 0x04 }, - { "IOERR", 0x08, 0x08 }, - { "SELINGO", 0x10, 0x10 }, - { "SELDI", 0x20, 0x20 }, - { "SELDO", 0x40, 0x40 }, - { "TARGET", 0x80, 0x80 } +static const ahd_reg_parse_entry_t TARGIDIN_parse_table[] = { + { "TARGID", 0x0f, 0x0f }, + { "CLKOUT", 0x80, 0x80 } }; int -ahd_sstat0_print(u_int regvalue, u_int *cur_col, u_int wrap) +ahd_targidin_print(u_int regvalue, u_int *cur_col, u_int wrap) { - return (ahd_print_register(SSTAT0_parse_table, 8, "SSTAT0", - 0x4b, regvalue, cur_col, wrap)); + return (ahd_print_register(TARGIDIN_parse_table, 2, "TARGIDIN", + 0x48, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SIMODE0_parse_table[] = { - { "ENARBDO", 0x01, 0x01 }, - { "ENSPIORDY", 0x02, 0x02 }, - { "ENOVERRUN", 0x04, 0x04 }, - { "ENIOERR", 0x08, 0x08 }, - { "ENSELINGO", 0x10, 0x10 }, - { "ENSELDI", 0x20, 0x20 }, - { "ENSELDO", 0x40, 0x40 } +static const ahd_reg_parse_entry_t SIMODE2_parse_table[] = { + { "ENDMADONE", 0x01, 0x01 }, + { "ENSDONE", 0x02, 0x02 }, + { "ENWIDE_RES", 0x04, 0x04 } }; int -ahd_simode0_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SIMODE0_parse_table, 7, "SIMODE0", - 0x4b, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t CLRSINT1_parse_table[] = { - { "CLRREQINIT", 0x01, 0x01 }, - { "CLRSTRB2FAST", 0x02, 0x02 }, - { "CLRSCSIPERR", 0x04, 0x04 }, - { "CLRBUSFREE", 0x08, 0x08 }, - { "CLRSCSIRSTI", 0x20, 0x20 }, - { "CLRATNO", 0x40, 0x40 }, - { "CLRSELTIMEO", 0x80, 0x80 } -}; - -int -ahd_clrsint1_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(CLRSINT1_parse_table, 7, "CLRSINT1", - 0x4c, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SSTAT1_parse_table[] = { - { "REQINIT", 0x01, 0x01 }, - { "STRB2FAST", 0x02, 0x02 }, - { "SCSIPERR", 0x04, 0x04 }, - { "BUSFREE", 0x08, 0x08 }, - { "PHASEMIS", 0x10, 0x10 }, - { "SCSIRSTI", 0x20, 0x20 }, - { "ATNTARG", 0x40, 0x40 }, - { "SELTO", 0x80, 0x80 } -}; - -int -ahd_sstat1_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SSTAT1_parse_table, 8, "SSTAT1", - 0x4c, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SSTAT2_parse_table[] = { - { "BUSFREE_LQO", 0x40, 0xc0 }, - { "BUSFREE_DFF0", 0x80, 0xc0 }, - { "BUSFREE_DFF1", 0xc0, 0xc0 }, - { "DMADONE", 0x01, 0x01 }, - { "SDONE", 0x02, 0x02 }, - { "WIDE_RES", 0x04, 0x04 }, - { "BSYX", 0x08, 0x08 }, - { "EXP_ACTIVE", 0x10, 0x10 }, - { "NONPACKREQ", 0x20, 0x20 }, - { "BUSFREETIME", 0xc0, 0xc0 } -}; - -int -ahd_sstat2_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SSTAT2_parse_table, 10, "SSTAT2", - 0x4d, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SIMODE2_parse_table[] = { - { "ENDMADONE", 0x01, 0x01 }, - { "ENSDONE", 0x02, 0x02 }, - { "ENWIDE_RES", 0x04, 0x04 } -}; - -int -ahd_simode2_print(u_int regvalue, u_int *cur_col, u_int wrap) +ahd_simode2_print(u_int regvalue, u_int *cur_col, u_int wrap) { return (ahd_print_register(SIMODE2_parse_table, 3, "SIMODE2", 0x4d, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CLRSINT2_parse_table[] = { +static const ahd_reg_parse_entry_t CLRSINT2_parse_table[] = { { "CLRDMADONE", 0x01, 0x01 }, { "CLRSDONE", 0x02, 0x02 }, { "CLRWIDE_RES", 0x04, 0x04 }, @@ -1025,24 +711,6 @@ ahd_clrsint2_print(u_int regvalue, u_int 0x4d, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t PERRDIAG_parse_table[] = { - { "DTERR", 0x01, 0x01 }, - { "DGFORMERR", 0x02, 0x02 }, - { "CRCERR", 0x04, 0x04 }, - { "AIPERR", 0x08, 0x08 }, - { "PARITYERR", 0x10, 0x10 }, - { "PREVPHASE", 0x20, 0x20 }, - { "HIPERR", 0x40, 0x40 }, - { "HIZERO", 0x80, 0x80 } -}; - -int -ahd_perrdiag_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(PERRDIAG_parse_table, 8, "PERRDIAG", - 0x4e, regvalue, cur_col, wrap)); -} - int ahd_lqistate_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -1051,36 +719,13 @@ ahd_lqistate_print(u_int regvalue, u_int } int -ahd_soffcnt_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(NULL, 0, "SOFFCNT", - 0x4f, regvalue, cur_col, wrap)); -} - -int ahd_lqostate_print(u_int regvalue, u_int *cur_col, u_int wrap) { return (ahd_print_register(NULL, 0, "LQOSTATE", 0x4f, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQISTAT0_parse_table[] = { - { "LQIATNCMD", 0x01, 0x01 }, - { "LQIATNLQ", 0x02, 0x02 }, - { "LQIBADLQT", 0x04, 0x04 }, - { "LQICRCT2", 0x08, 0x08 }, - { "LQICRCT1", 0x10, 0x10 }, - { "LQIATNQAS", 0x20, 0x20 } -}; - -int -ahd_lqistat0_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(LQISTAT0_parse_table, 6, "LQISTAT0", - 0x50, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t CLRLQIINT0_parse_table[] = { +static const ahd_reg_parse_entry_t CLRLQIINT0_parse_table[] = { { "CLRLQIATNCMD", 0x01, 0x01 }, { "CLRLQIATNLQ", 0x02, 0x02 }, { "CLRLQIBADLQT", 0x04, 0x04 }, @@ -1096,7 +741,7 @@ ahd_clrlqiint0_print(u_int regvalue, u_i 0x50, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQIMODE0_parse_table[] = { +static const ahd_reg_parse_entry_t LQIMODE0_parse_table[] = { { "ENLQIATNCMD", 0x01, 0x01 }, { "ENLQIATNLQ", 0x02, 0x02 }, { "ENLQIBADLQT", 0x04, 0x04 }, @@ -1112,7 +757,7 @@ ahd_lqimode0_print(u_int regvalue, u_int 0x50, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQIMODE1_parse_table[] = { +static const ahd_reg_parse_entry_t LQIMODE1_parse_table[] = { { "ENLQIOVERI_NLQ", 0x01, 0x01 }, { "ENLQIOVERI_LQ", 0x02, 0x02 }, { "ENLQIBADLQI", 0x04, 0x04 }, @@ -1130,25 +775,7 @@ ahd_lqimode1_print(u_int regvalue, u_int 0x51, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQISTAT1_parse_table[] = { - { "LQIOVERI_NLQ", 0x01, 0x01 }, - { "LQIOVERI_LQ", 0x02, 0x02 }, - { "LQIBADLQI", 0x04, 0x04 }, - { "LQICRCI_NLQ", 0x08, 0x08 }, - { "LQICRCI_LQ", 0x10, 0x10 }, - { "LQIABORT", 0x20, 0x20 }, - { "LQIPHASE_NLQ", 0x40, 0x40 }, - { "LQIPHASE_LQ", 0x80, 0x80 } -}; - -int -ahd_lqistat1_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(LQISTAT1_parse_table, 8, "LQISTAT1", - 0x51, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t CLRLQIINT1_parse_table[] = { +static const ahd_reg_parse_entry_t CLRLQIINT1_parse_table[] = { { "CLRLQIOVERI_NLQ", 0x01, 0x01 }, { "CLRLQIOVERI_LQ", 0x02, 0x02 }, { "CLRLQIBADLQI", 0x04, 0x04 }, @@ -1166,37 +793,7 @@ ahd_clrlqiint1_print(u_int regvalue, u_i 0x51, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQISTAT2_parse_table[] = { - { "LQIGSAVAIL", 0x01, 0x01 }, - { "LQISTOPCMD", 0x02, 0x02 }, - { "LQISTOPLQ", 0x04, 0x04 }, - { "LQISTOPPKT", 0x08, 0x08 }, - { "LQIWAITFIFO", 0x10, 0x10 }, - { "LQIWORKONLQ", 0x20, 0x20 }, - { "LQIPHASE_OUTPKT", 0x40, 0x40 }, - { "PACKETIZED", 0x80, 0x80 } -}; - -int -ahd_lqistat2_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(LQISTAT2_parse_table, 8, "LQISTAT2", - 0x52, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SSTAT3_parse_table[] = { - { "OSRAMPERR", 0x01, 0x01 }, - { "NTRAMPERR", 0x02, 0x02 } -}; - -int -ahd_sstat3_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SSTAT3_parse_table, 2, "SSTAT3", - 0x53, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SIMODE3_parse_table[] = { +static const ahd_reg_parse_entry_t SIMODE3_parse_table[] = { { "ENOSRAMPERR", 0x01, 0x01 }, { "ENNTRAMPERR", 0x02, 0x02 } }; @@ -1208,7 +805,7 @@ ahd_simode3_print(u_int regvalue, u_int 0x53, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CLRSINT3_parse_table[] = { +static const ahd_reg_parse_entry_t CLRSINT3_parse_table[] = { { "CLROSRAMPERR", 0x01, 0x01 }, { "CLRNTRAMPERR", 0x02, 0x02 } }; @@ -1220,22 +817,7 @@ ahd_clrsint3_print(u_int regvalue, u_int 0x53, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQOSTAT0_parse_table[] = { - { "LQOTCRC", 0x01, 0x01 }, - { "LQOATNPKT", 0x02, 0x02 }, - { "LQOATNLQ", 0x04, 0x04 }, - { "LQOSTOPT2", 0x08, 0x08 }, - { "LQOTARGSCBPERR", 0x10, 0x10 } -}; - -int -ahd_lqostat0_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(LQOSTAT0_parse_table, 5, "LQOSTAT0", - 0x54, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t CLRLQOINT0_parse_table[] = { +static const ahd_reg_parse_entry_t CLRLQOINT0_parse_table[] = { { "CLRLQOTCRC", 0x01, 0x01 }, { "CLRLQOATNPKT", 0x02, 0x02 }, { "CLRLQOATNLQ", 0x04, 0x04 }, @@ -1250,7 +832,7 @@ ahd_clrlqoint0_print(u_int regvalue, u_i 0x54, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQOMODE0_parse_table[] = { +static const ahd_reg_parse_entry_t LQOMODE0_parse_table[] = { { "ENLQOTCRC", 0x01, 0x01 }, { "ENLQOATNPKT", 0x02, 0x02 }, { "ENLQOATNLQ", 0x04, 0x04 }, @@ -1265,7 +847,7 @@ ahd_lqomode0_print(u_int regvalue, u_int 0x54, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQOMODE1_parse_table[] = { +static const ahd_reg_parse_entry_t LQOMODE1_parse_table[] = { { "ENLQOPHACHGINPKT", 0x01, 0x01 }, { "ENLQOBUSFREE", 0x02, 0x02 }, { "ENLQOBADQAS", 0x04, 0x04 }, @@ -1280,22 +862,7 @@ ahd_lqomode1_print(u_int regvalue, u_int 0x55, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQOSTAT1_parse_table[] = { - { "LQOPHACHGINPKT", 0x01, 0x01 }, - { "LQOBUSFREE", 0x02, 0x02 }, - { "LQOBADQAS", 0x04, 0x04 }, - { "LQOSTOPI2", 0x08, 0x08 }, - { "LQOINITSCBPERR", 0x10, 0x10 } -}; - -int -ahd_lqostat1_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(LQOSTAT1_parse_table, 5, "LQOSTAT1", - 0x55, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t CLRLQOINT1_parse_table[] = { +static const ahd_reg_parse_entry_t CLRLQOINT1_parse_table[] = { { "CLRLQOPHACHGINPKT", 0x01, 0x01 }, { "CLRLQOBUSFREE", 0x02, 0x02 }, { "CLRLQOBADQAS", 0x04, 0x04 }, @@ -1310,20 +877,6 @@ ahd_clrlqoint1_print(u_int regvalue, u_i 0x55, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LQOSTAT2_parse_table[] = { - { "LQOSTOP0", 0x01, 0x01 }, - { "LQOPHACHGOUTPKT", 0x02, 0x02 }, - { "LQOWAITFIFO", 0x10, 0x10 }, - { "LQOPKT", 0xe0, 0xe0 } -}; - -int -ahd_lqostat2_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(LQOSTAT2_parse_table, 4, "LQOSTAT2", - 0x56, regvalue, cur_col, wrap)); -} - int ahd_os_space_cnt_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -1331,24 +884,6 @@ ahd_os_space_cnt_print(u_int regvalue, u 0x56, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SIMODE1_parse_table[] = { - { "ENREQINIT", 0x01, 0x01 }, - { "ENSTRB2FAST", 0x02, 0x02 }, - { "ENSCSIPERR", 0x04, 0x04 }, - { "ENBUSFREE", 0x08, 0x08 }, - { "ENPHASEMIS", 0x10, 0x10 }, - { "ENSCSIRST", 0x20, 0x20 }, - { "ENATNTARG", 0x40, 0x40 }, - { "ENSELTIMO", 0x80, 0x80 } -}; - -int -ahd_simode1_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SIMODE1_parse_table, 8, "SIMODE1", - 0x57, regvalue, cur_col, wrap)); -} - int ahd_gsfifo_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -1356,21 +891,7 @@ ahd_gsfifo_print(u_int regvalue, u_int * 0x58, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DFFSXFRCTL_parse_table[] = { - { "RSTCHN", 0x01, 0x01 }, - { "CLRCHN", 0x02, 0x02 }, - { "CLRSHCNT", 0x04, 0x04 }, - { "DFFBITBUCKET", 0x08, 0x08 } -}; - -int -ahd_dffsxfrctl_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(DFFSXFRCTL_parse_table, 4, "DFFSXFRCTL", - 0x5a, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t LQOSCSCTL_parse_table[] = { +static const ahd_reg_parse_entry_t LQOSCSCTL_parse_table[] = { { "LQONOCHKOVER", 0x01, 0x01 }, { "LQOH2A_VERSION", 0x80, 0x80 } }; @@ -1389,7 +910,7 @@ ahd_nextscb_print(u_int regvalue, u_int 0x5a, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CLRSEQINTSRC_parse_table[] = { +static const ahd_reg_parse_entry_t CLRSEQINTSRC_parse_table[] = { { "CLRCFG4TCMD", 0x01, 0x01 }, { "CLRCFG4ICMD", 0x02, 0x02 }, { "CLRCFG4TSTAT", 0x04, 0x04 }, @@ -1406,23 +927,6 @@ ahd_clrseqintsrc_print(u_int regvalue, u 0x5b, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SEQINTSRC_parse_table[] = { - { "CFG4TCMD", 0x01, 0x01 }, - { "CFG4ICMD", 0x02, 0x02 }, - { "CFG4TSTAT", 0x04, 0x04 }, - { "CFG4ISTAT", 0x08, 0x08 }, - { "CFG4DATA", 0x10, 0x10 }, - { "SAVEPTRS", 0x20, 0x20 }, - { "CTXTDONE", 0x40, 0x40 } -}; - -int -ahd_seqintsrc_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SEQINTSRC_parse_table, 7, "SEQINTSRC", - 0x5b, regvalue, cur_col, wrap)); -} - int ahd_currscb_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -1430,49 +934,15 @@ ahd_currscb_print(u_int regvalue, u_int 0x5c, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SEQIMODE_parse_table[] = { - { "ENCFG4TCMD", 0x01, 0x01 }, - { "ENCFG4ICMD", 0x02, 0x02 }, - { "ENCFG4TSTAT", 0x04, 0x04 }, - { "ENCFG4ISTAT", 0x08, 0x08 }, - { "ENCFG4DATA", 0x10, 0x10 }, - { "ENSAVEPTRS", 0x20, 0x20 }, - { "ENCTXTDONE", 0x40, 0x40 } +static const ahd_reg_parse_entry_t CRCCONTROL_parse_table[] = { + { "CRCVALCHKEN", 0x40, 0x40 } }; int -ahd_seqimode_print(u_int regvalue, u_int *cur_col, u_int wrap) +ahd_crccontrol_print(u_int regvalue, u_int *cur_col, u_int wrap) { - return (ahd_print_register(SEQIMODE_parse_table, 7, "SEQIMODE", - 0x5c, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t MDFFSTAT_parse_table[] = { - { "FIFOFREE", 0x01, 0x01 }, - { "DATAINFIFO", 0x02, 0x02 }, - { "DLZERO", 0x04, 0x04 }, - { "SHVALID", 0x08, 0x08 }, - { "LASTSDONE", 0x10, 0x10 }, - { "SHCNTMINUS1", 0x20, 0x20 }, - { "SHCNTNEGATIVE", 0x40, 0x40 } -}; - -int -ahd_mdffstat_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(MDFFSTAT_parse_table, 7, "MDFFSTAT", - 0x5d, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t CRCCONTROL_parse_table[] = { - { "CRCVALCHKEN", 0x40, 0x40 } -}; - -int -ahd_crccontrol_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(CRCCONTROL_parse_table, 1, "CRCCONTROL", - 0x5d, regvalue, cur_col, wrap)); + return (ahd_print_register(CRCCONTROL_parse_table, 1, "CRCCONTROL", + 0x5d, regvalue, cur_col, wrap)); } int @@ -1489,7 +959,7 @@ ahd_lastscb_print(u_int regvalue, u_int 0x5e, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCSITEST_parse_table[] = { +static const ahd_reg_parse_entry_t SCSITEST_parse_table[] = { { "SEL_TXPLL_DEBUG", 0x04, 0x04 }, { "CNTRTEST", 0x08, 0x08 } }; @@ -1501,7 +971,7 @@ ahd_scsitest_print(u_int regvalue, u_int 0x5e, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t IOPDNCTL_parse_table[] = { +static const ahd_reg_parse_entry_t IOPDNCTL_parse_table[] = { { "PDN_DIFFSENSE", 0x01, 0x01 }, { "PDN_IDIST", 0x04, 0x04 }, { "DISABLE_OE", 0x80, 0x80 } @@ -1556,7 +1026,7 @@ ahd_negoffset_print(u_int regvalue, u_in 0x62, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t NEGPPROPTS_parse_table[] = { +static const ahd_reg_parse_entry_t NEGPPROPTS_parse_table[] = { { "PPROPT_IUT", 0x01, 0x01 }, { "PPROPT_DT", 0x02, 0x02 }, { "PPROPT_QAS", 0x04, 0x04 }, @@ -1570,7 +1040,7 @@ ahd_negppropts_print(u_int regvalue, u_i 0x63, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t NEGCONOPTS_parse_table[] = { +static const ahd_reg_parse_entry_t NEGCONOPTS_parse_table[] = { { "WIDEXFER", 0x01, 0x01 }, { "ENAUTOATNO", 0x02, 0x02 }, { "ENAUTOATNI", 0x04, 0x04 }, @@ -1601,7 +1071,7 @@ ahd_annexdat_print(u_int regvalue, u_int 0x66, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCSCHKN_parse_table[] = { +static const ahd_reg_parse_entry_t SCSCHKN_parse_table[] = { { "LSTSGCLRDIS", 0x01, 0x01 }, { "SHVALIDSTDIS", 0x02, 0x02 }, { "DFFACTCLR", 0x04, 0x04 }, @@ -1625,7 +1095,7 @@ ahd_iownid_print(u_int regvalue, u_int * 0x67, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t PLL960CTL0_parse_table[] = { +static const ahd_reg_parse_entry_t PLL960CTL0_parse_table[] = { { "PLL_ENFBM", 0x01, 0x01 }, { "PLL_DLPF", 0x02, 0x02 }, { "PLL_ENLPF", 0x04, 0x04 }, @@ -1656,7 +1126,7 @@ ahd_townid_print(u_int regvalue, u_int * 0x69, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t PLL960CTL1_parse_table[] = { +static const ahd_reg_parse_entry_t PLL960CTL1_parse_table[] = { { "PLL_RST", 0x01, 0x01 }, { "PLL_CNTCLR", 0x40, 0x40 }, { "PLL_CNTEN", 0x80, 0x80 } @@ -1683,14 +1153,7 @@ ahd_xsig_print(u_int regvalue, u_int *cu 0x6a, regvalue, cur_col, wrap)); } -int -ahd_seloid_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(NULL, 0, "SELOID", - 0x6b, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t PLL400CTL0_parse_table[] = { +static const ahd_reg_parse_entry_t PLL400CTL0_parse_table[] = { { "PLL_ENFBM", 0x01, 0x01 }, { "PLL_DLPF", 0x02, 0x02 }, { "PLL_ENLPF", 0x04, 0x04 }, @@ -1714,7 +1177,7 @@ ahd_fairness_print(u_int regvalue, u_int 0x6c, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t PLL400CTL1_parse_table[] = { +static const ahd_reg_parse_entry_t PLL400CTL1_parse_table[] = { { "PLL_RST", 0x01, 0x01 }, { "PLL_CNTCLR", 0x40, 0x40 }, { "PLL_CNTEN", 0x80, 0x80 } @@ -1748,7 +1211,7 @@ ahd_haddr_print(u_int regvalue, u_int *c 0x70, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t PLLDELAY_parse_table[] = { +static const ahd_reg_parse_entry_t PLLDELAY_parse_table[] = { { "SPLIT_DROP_REQ", 0x80, 0x80 } }; @@ -1815,7 +1278,7 @@ ahd_sghcnt_print(u_int regvalue, u_int * 0x84, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DFF_THRSH_parse_table[] = { +static const ahd_reg_parse_entry_t DFF_THRSH_parse_table[] = { { "WR_DFTHRSH_MIN", 0x00, 0x70 }, { "RD_DFTHRSH_MIN", 0x00, 0x07 }, { "RD_DFTHRSH_25", 0x01, 0x07 }, @@ -1850,7 +1313,7 @@ ahd_romaddr_print(u_int regvalue, u_int 0x8a, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t ROMCNTRL_parse_table[] = { +static const ahd_reg_parse_entry_t ROMCNTRL_parse_table[] = { { "RDY", 0x01, 0x01 }, { "REPEAT", 0x02, 0x02 }, { "ROMSPD", 0x18, 0x18 }, @@ -1871,7 +1334,7 @@ ahd_romdata_print(u_int regvalue, u_int 0x8e, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CMCRXMSG0_parse_table[] = { +static const ahd_reg_parse_entry_t CMCRXMSG0_parse_table[] = { { "CFNUM", 0x07, 0x07 }, { "CDNUM", 0xf8, 0xf8 } }; @@ -1883,7 +1346,7 @@ ahd_cmcrxmsg0_print(u_int regvalue, u_in 0x90, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t ROENABLE_parse_table[] = { +static const ahd_reg_parse_entry_t ROENABLE_parse_table[] = { { "DCH0ROEN", 0x01, 0x01 }, { "DCH1ROEN", 0x02, 0x02 }, { "SGROEN", 0x04, 0x04 }, @@ -1899,7 +1362,7 @@ ahd_roenable_print(u_int regvalue, u_int 0x90, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t OVLYRXMSG0_parse_table[] = { +static const ahd_reg_parse_entry_t OVLYRXMSG0_parse_table[] = { { "CFNUM", 0x07, 0x07 }, { "CDNUM", 0xf8, 0xf8 } }; @@ -1911,7 +1374,7 @@ ahd_ovlyrxmsg0_print(u_int regvalue, u_i 0x90, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DCHRXMSG0_parse_table[] = { +static const ahd_reg_parse_entry_t DCHRXMSG0_parse_table[] = { { "CFNUM", 0x07, 0x07 }, { "CDNUM", 0xf8, 0xf8 } }; @@ -1923,7 +1386,7 @@ ahd_dchrxmsg0_print(u_int regvalue, u_in 0x90, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t OVLYRXMSG1_parse_table[] = { +static const ahd_reg_parse_entry_t OVLYRXMSG1_parse_table[] = { { "CBNUM", 0xff, 0xff } }; @@ -1934,7 +1397,7 @@ ahd_ovlyrxmsg1_print(u_int regvalue, u_i 0x91, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t NSENABLE_parse_table[] = { +static const ahd_reg_parse_entry_t NSENABLE_parse_table[] = { { "DCH0NSEN", 0x01, 0x01 }, { "DCH1NSEN", 0x02, 0x02 }, { "SGNSEN", 0x04, 0x04 }, @@ -1950,7 +1413,7 @@ ahd_nsenable_print(u_int regvalue, u_int 0x91, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CMCRXMSG1_parse_table[] = { +static const ahd_reg_parse_entry_t CMCRXMSG1_parse_table[] = { { "CBNUM", 0xff, 0xff } }; @@ -1961,7 +1424,7 @@ ahd_cmcrxmsg1_print(u_int regvalue, u_in 0x91, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DCHRXMSG1_parse_table[] = { +static const ahd_reg_parse_entry_t DCHRXMSG1_parse_table[] = { { "CBNUM", 0xff, 0xff } }; @@ -1972,7 +1435,7 @@ ahd_dchrxmsg1_print(u_int regvalue, u_in 0x91, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DCHRXMSG2_parse_table[] = { +static const ahd_reg_parse_entry_t DCHRXMSG2_parse_table[] = { { "MINDEX", 0xff, 0xff } }; @@ -1983,7 +1446,7 @@ ahd_dchrxmsg2_print(u_int regvalue, u_in 0x92, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CMCRXMSG2_parse_table[] = { +static const ahd_reg_parse_entry_t CMCRXMSG2_parse_table[] = { { "MINDEX", 0xff, 0xff } }; @@ -2001,7 +1464,7 @@ ahd_ost_print(u_int regvalue, u_int *cur 0x92, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t OVLYRXMSG2_parse_table[] = { +static const ahd_reg_parse_entry_t OVLYRXMSG2_parse_table[] = { { "MINDEX", 0xff, 0xff } }; @@ -2012,7 +1475,7 @@ ahd_ovlyrxmsg2_print(u_int regvalue, u_i 0x92, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DCHRXMSG3_parse_table[] = { +static const ahd_reg_parse_entry_t DCHRXMSG3_parse_table[] = { { "MCLASS", 0x0f, 0x0f } }; @@ -2023,7 +1486,7 @@ ahd_dchrxmsg3_print(u_int regvalue, u_in 0x93, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t OVLYRXMSG3_parse_table[] = { +static const ahd_reg_parse_entry_t OVLYRXMSG3_parse_table[] = { { "MCLASS", 0x0f, 0x0f } }; @@ -2034,7 +1497,7 @@ ahd_ovlyrxmsg3_print(u_int regvalue, u_i 0x93, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CMCRXMSG3_parse_table[] = { +static const ahd_reg_parse_entry_t CMCRXMSG3_parse_table[] = { { "MCLASS", 0x0f, 0x0f } }; @@ -2045,7 +1508,7 @@ ahd_cmcrxmsg3_print(u_int regvalue, u_in 0x93, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t PCIXCTL_parse_table[] = { +static const ahd_reg_parse_entry_t PCIXCTL_parse_table[] = { { "CMPABCDIS", 0x01, 0x01 }, { "TSCSERREN", 0x02, 0x02 }, { "SRSPDPEEN", 0x04, 0x04 }, @@ -2083,7 +1546,7 @@ ahd_cmcseqbcnt_print(u_int regvalue, u_i 0x94, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CMCSPLTSTAT0_parse_table[] = { +static const ahd_reg_parse_entry_t CMCSPLTSTAT0_parse_table[] = { { "RXSPLTRSP", 0x01, 0x01 }, { "RXSCEMSG", 0x02, 0x02 }, { "RXOVRUN", 0x04, 0x04 }, @@ -2101,7 +1564,7 @@ ahd_cmcspltstat0_print(u_int regvalue, u 0x96, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DCHSPLTSTAT0_parse_table[] = { +static const ahd_reg_parse_entry_t DCHSPLTSTAT0_parse_table[] = { { "RXSPLTRSP", 0x01, 0x01 }, { "RXSCEMSG", 0x02, 0x02 }, { "RXOVRUN", 0x04, 0x04 }, @@ -2119,7 +1582,7 @@ ahd_dchspltstat0_print(u_int regvalue, u 0x96, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t OVLYSPLTSTAT0_parse_table[] = { +static const ahd_reg_parse_entry_t OVLYSPLTSTAT0_parse_table[] = { { "RXSPLTRSP", 0x01, 0x01 }, { "RXSCEMSG", 0x02, 0x02 }, { "RXOVRUN", 0x04, 0x04 }, @@ -2137,7 +1600,7 @@ ahd_ovlyspltstat0_print(u_int regvalue, 0x96, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CMCSPLTSTAT1_parse_table[] = { +static const ahd_reg_parse_entry_t CMCSPLTSTAT1_parse_table[] = { { "RXDATABUCKET", 0x01, 0x01 } }; @@ -2148,7 +1611,7 @@ ahd_cmcspltstat1_print(u_int regvalue, u 0x97, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t OVLYSPLTSTAT1_parse_table[] = { +static const ahd_reg_parse_entry_t OVLYSPLTSTAT1_parse_table[] = { { "RXDATABUCKET", 0x01, 0x01 } }; @@ -2159,7 +1622,7 @@ ahd_ovlyspltstat1_print(u_int regvalue, 0x97, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DCHSPLTSTAT1_parse_table[] = { +static const ahd_reg_parse_entry_t DCHSPLTSTAT1_parse_table[] = { { "RXDATABUCKET", 0x01, 0x01 } }; @@ -2170,7 +1633,7 @@ ahd_dchspltstat1_print(u_int regvalue, u 0x97, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SGRXMSG0_parse_table[] = { +static const ahd_reg_parse_entry_t SGRXMSG0_parse_table[] = { { "CFNUM", 0x07, 0x07 }, { "CDNUM", 0xf8, 0xf8 } }; @@ -2182,7 +1645,7 @@ ahd_sgrxmsg0_print(u_int regvalue, u_int 0x98, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SLVSPLTOUTADR0_parse_table[] = { +static const ahd_reg_parse_entry_t SLVSPLTOUTADR0_parse_table[] = { { "LOWER_ADDR", 0x7f, 0x7f } }; @@ -2193,7 +1656,7 @@ ahd_slvspltoutadr0_print(u_int regvalue, 0x98, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SGRXMSG1_parse_table[] = { +static const ahd_reg_parse_entry_t SGRXMSG1_parse_table[] = { { "CBNUM", 0xff, 0xff } }; @@ -2204,7 +1667,7 @@ ahd_sgrxmsg1_print(u_int regvalue, u_int 0x99, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SLVSPLTOUTADR1_parse_table[] = { +static const ahd_reg_parse_entry_t SLVSPLTOUTADR1_parse_table[] = { { "REQ_FNUM", 0x07, 0x07 }, { "REQ_DNUM", 0xf8, 0xf8 } }; @@ -2216,7 +1679,7 @@ ahd_slvspltoutadr1_print(u_int regvalue, 0x99, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SGRXMSG2_parse_table[] = { +static const ahd_reg_parse_entry_t SGRXMSG2_parse_table[] = { { "MINDEX", 0xff, 0xff } }; @@ -2227,7 +1690,7 @@ ahd_sgrxmsg2_print(u_int regvalue, u_int 0x9a, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SLVSPLTOUTADR2_parse_table[] = { +static const ahd_reg_parse_entry_t SLVSPLTOUTADR2_parse_table[] = { { "REQ_BNUM", 0xff, 0xff } }; @@ -2238,7 +1701,7 @@ ahd_slvspltoutadr2_print(u_int regvalue, 0x9a, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SGRXMSG3_parse_table[] = { +static const ahd_reg_parse_entry_t SGRXMSG3_parse_table[] = { { "MCLASS", 0x0f, 0x0f } }; @@ -2249,7 +1712,7 @@ ahd_sgrxmsg3_print(u_int regvalue, u_int 0x9b, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SLVSPLTOUTADR3_parse_table[] = { +static const ahd_reg_parse_entry_t SLVSPLTOUTADR3_parse_table[] = { { "RLXORD", 0x10, 0x10 }, { "TAG_NUM", 0x1f, 0x1f } }; @@ -2268,7 +1731,7 @@ ahd_sgseqbcnt_print(u_int regvalue, u_in 0x9c, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SLVSPLTOUTATTR0_parse_table[] = { +static const ahd_reg_parse_entry_t SLVSPLTOUTATTR0_parse_table[] = { { "LOWER_BCNT", 0xff, 0xff } }; @@ -2279,7 +1742,7 @@ ahd_slvspltoutattr0_print(u_int regvalue 0x9c, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SLVSPLTOUTATTR1_parse_table[] = { +static const ahd_reg_parse_entry_t SLVSPLTOUTATTR1_parse_table[] = { { "CMPLT_FNUM", 0x07, 0x07 }, { "CMPLT_DNUM", 0xf8, 0xf8 } }; @@ -2291,7 +1754,7 @@ ahd_slvspltoutattr1_print(u_int regvalue 0x9d, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SLVSPLTOUTATTR2_parse_table[] = { +static const ahd_reg_parse_entry_t SLVSPLTOUTATTR2_parse_table[] = { { "CMPLT_BNUM", 0xff, 0xff } }; @@ -2302,7 +1765,7 @@ ahd_slvspltoutattr2_print(u_int regvalue 0x9e, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SGSPLTSTAT0_parse_table[] = { +static const ahd_reg_parse_entry_t SGSPLTSTAT0_parse_table[] = { { "RXSPLTRSP", 0x01, 0x01 }, { "RXSCEMSG", 0x02, 0x02 }, { "RXOVRUN", 0x04, 0x04 }, @@ -2320,7 +1783,7 @@ ahd_sgspltstat0_print(u_int regvalue, u_ 0x9e, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SGSPLTSTAT1_parse_table[] = { +static const ahd_reg_parse_entry_t SGSPLTSTAT1_parse_table[] = { { "RXDATABUCKET", 0x01, 0x01 } }; @@ -2331,7 +1794,7 @@ ahd_sgspltstat1_print(u_int regvalue, u_ 0x9f, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SFUNCT_parse_table[] = { +static const ahd_reg_parse_entry_t SFUNCT_parse_table[] = { { "TEST_NUM", 0x0f, 0x0f }, { "TEST_GROUP", 0xf0, 0xf0 } }; @@ -2343,7 +1806,7 @@ ahd_sfunct_print(u_int regvalue, u_int * 0x9f, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DF0PCISTAT_parse_table[] = { +static const ahd_reg_parse_entry_t DF0PCISTAT_parse_table[] = { { "DPR", 0x01, 0x01 }, { "TWATERR", 0x02, 0x02 }, { "RDPERR", 0x04, 0x04 }, @@ -2368,7 +1831,7 @@ ahd_reg0_print(u_int regvalue, u_int *cu 0xa0, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DF1PCISTAT_parse_table[] = { +static const ahd_reg_parse_entry_t DF1PCISTAT_parse_table[] = { { "DPR", 0x01, 0x01 }, { "TWATERR", 0x02, 0x02 }, { "RDPERR", 0x04, 0x04 }, @@ -2386,7 +1849,7 @@ ahd_df1pcistat_print(u_int regvalue, u_i 0xa1, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SGPCISTAT_parse_table[] = { +static const ahd_reg_parse_entry_t SGPCISTAT_parse_table[] = { { "DPR", 0x01, 0x01 }, { "RDPERR", 0x04, 0x04 }, { "SCAAPERR", 0x08, 0x08 }, @@ -2410,7 +1873,7 @@ ahd_reg1_print(u_int regvalue, u_int *cu 0xa2, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CMCPCISTAT_parse_table[] = { +static const ahd_reg_parse_entry_t CMCPCISTAT_parse_table[] = { { "DPR", 0x01, 0x01 }, { "TWATERR", 0x02, 0x02 }, { "RDPERR", 0x04, 0x04 }, @@ -2428,7 +1891,7 @@ ahd_cmcpcistat_print(u_int regvalue, u_i 0xa3, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t OVLYPCISTAT_parse_table[] = { +static const ahd_reg_parse_entry_t OVLYPCISTAT_parse_table[] = { { "DPR", 0x01, 0x01 }, { "RDPERR", 0x04, 0x04 }, { "SCAAPERR", 0x08, 0x08 }, @@ -2452,20 +1915,7 @@ ahd_reg_isr_print(u_int regvalue, u_int 0xa4, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SG_STATE_parse_table[] = { - { "SEGS_AVAIL", 0x01, 0x01 }, - { "LOADING_NEEDED", 0x02, 0x02 }, - { "FETCH_INPROG", 0x04, 0x04 } -}; - -int -ahd_sg_state_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SG_STATE_parse_table, 3, "SG_STATE", - 0xa6, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t MSIPCISTAT_parse_table[] = { +static const ahd_reg_parse_entry_t MSIPCISTAT_parse_table[] = { { "DPR", 0x01, 0x01 }, { "TWATERR", 0x02, 0x02 }, { "CLRPENDMSI", 0x08, 0x08 }, @@ -2481,7 +1931,7 @@ ahd_msipcistat_print(u_int regvalue, u_i 0xa6, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t TARGPCISTAT_parse_table[] = { +static const ahd_reg_parse_entry_t TARGPCISTAT_parse_table[] = { { "TWATERR", 0x02, 0x02 }, { "STA", 0x08, 0x08 }, { "SSE", 0x40, 0x40 }, @@ -2516,7 +1966,7 @@ ahd_ccscbacnt_print(u_int regvalue, u_in 0xab, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCBAUTOPTR_parse_table[] = { +static const ahd_reg_parse_entry_t SCBAUTOPTR_parse_table[] = { { "SCBPTR_OFF", 0x07, 0x07 }, { "SCBPTR_ADDR", 0x38, 0x38 }, { "AUSCBPTR_EN", 0x80, 0x80 } @@ -2550,7 +2000,7 @@ ahd_ccscbaddr_print(u_int regvalue, u_in 0xac, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CMC_RAMBIST_parse_table[] = { +static const ahd_reg_parse_entry_t CMC_RAMBIST_parse_table[] = { { "CMC_BUFFER_BIST_EN", 0x01, 0x01 }, { "CMC_BUFFER_BIST_FAIL",0x02, 0x02 }, { "SG_BIST_EN", 0x10, 0x10 }, @@ -2566,38 +2016,6 @@ ahd_cmc_rambist_print(u_int regvalue, u_ 0xad, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t CCSCBCTL_parse_table[] = { - { "CCSCBRESET", 0x01, 0x01 }, - { "CCSCBDIR", 0x04, 0x04 }, - { "CCSCBEN", 0x08, 0x08 }, - { "CCARREN", 0x10, 0x10 }, - { "ARRDONE", 0x40, 0x40 }, - { "CCSCBDONE", 0x80, 0x80 } -}; - -int -ahd_ccscbctl_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(CCSCBCTL_parse_table, 6, "CCSCBCTL", - 0xad, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t CCSGCTL_parse_table[] = { - { "CCSGRESET", 0x01, 0x01 }, - { "SG_FETCH_REQ", 0x02, 0x02 }, - { "CCSGENACK", 0x08, 0x08 }, - { "SG_CACHE_AVAIL", 0x10, 0x10 }, - { "CCSGDONE", 0x80, 0x80 }, - { "CCSGEN", 0x0c, 0x0c } -}; - -int -ahd_ccsgctl_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(CCSGCTL_parse_table, 6, "CCSGCTL", - 0xad, regvalue, cur_col, wrap)); -} - int ahd_ccsgram_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -2626,7 +2044,7 @@ ahd_flexcnt_print(u_int regvalue, u_int 0xb3, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t FLEXDMASTAT_parse_table[] = { +static const ahd_reg_parse_entry_t FLEXDMASTAT_parse_table[] = { { "FLEXDMADONE", 0x01, 0x01 }, { "FLEXDMAERR", 0x02, 0x02 } }; @@ -2652,7 +2070,7 @@ ahd_brddat_print(u_int regvalue, u_int * 0xb8, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t BRDCTL_parse_table[] = { +static const ahd_reg_parse_entry_t BRDCTL_parse_table[] = { { "BRDSTB", 0x01, 0x01 }, { "BRDRW", 0x02, 0x02 }, { "BRDEN", 0x04, 0x04 }, @@ -2682,7 +2100,7 @@ ahd_seedat_print(u_int regvalue, u_int * 0xbc, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SEECTL_parse_table[] = { +static const ahd_reg_parse_entry_t SEECTL_parse_table[] = { { "SEEOP_ERAL", 0x40, 0x70 }, { "SEEOP_WRITE", 0x50, 0x70 }, { "SEEOP_READ", 0x60, 0x70 }, @@ -2702,7 +2120,7 @@ ahd_seectl_print(u_int regvalue, u_int * 0xbe, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SEESTAT_parse_table[] = { +static const ahd_reg_parse_entry_t SEESTAT_parse_table[] = { { "SEESTART", 0x01, 0x01 }, { "SEEBUSY", 0x02, 0x02 }, { "SEEARBACK", 0x04, 0x04 }, @@ -2732,7 +2150,7 @@ ahd_dfwaddr_print(u_int regvalue, u_int 0xc0, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DSPFLTRCTL_parse_table[] = { +static const ahd_reg_parse_entry_t DSPFLTRCTL_parse_table[] = { { "DSPFCNTSEL", 0x0f, 0x0f }, { "EDGESENSE", 0x10, 0x10 }, { "FLTRDISABLE", 0x20, 0x20 } @@ -2745,7 +2163,7 @@ ahd_dspfltrctl_print(u_int regvalue, u_i 0xc0, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DSPDATACTL_parse_table[] = { +static const ahd_reg_parse_entry_t DSPDATACTL_parse_table[] = { { "XMITOFFSTDIS", 0x02, 0x02 }, { "RCVROFFSTDIS", 0x04, 0x04 }, { "DESQDIS", 0x10, 0x10 }, @@ -2766,7 +2184,7 @@ ahd_dfraddr_print(u_int regvalue, u_int 0xc2, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DSPREQCTL_parse_table[] = { +static const ahd_reg_parse_entry_t DSPREQCTL_parse_table[] = { { "MANREQDLY", 0x3f, 0x3f }, { "MANREQCTL", 0xc0, 0xc0 } }; @@ -2778,7 +2196,7 @@ ahd_dspreqctl_print(u_int regvalue, u_in 0xc2, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DSPACKCTL_parse_table[] = { +static const ahd_reg_parse_entry_t DSPACKCTL_parse_table[] = { { "MANACKDLY", 0x3f, 0x3f }, { "MANACKCTL", 0xc0, 0xc0 } }; @@ -2797,7 +2215,7 @@ ahd_dfdat_print(u_int regvalue, u_int *c 0xc4, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DSPSELECT_parse_table[] = { +static const ahd_reg_parse_entry_t DSPSELECT_parse_table[] = { { "DSPSEL", 0x1f, 0x1f }, { "AUTOINCEN", 0x80, 0x80 } }; @@ -2809,7 +2227,7 @@ ahd_dspselect_print(u_int regvalue, u_in 0xc4, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t WRTBIASCTL_parse_table[] = { +static const ahd_reg_parse_entry_t WRTBIASCTL_parse_table[] = { { "XMITMANVAL", 0x3f, 0x3f }, { "AUTOXBCDIS", 0x80, 0x80 } }; @@ -2821,7 +2239,7 @@ ahd_wrtbiasctl_print(u_int regvalue, u_i 0xc5, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t RCVRBIOSCTL_parse_table[] = { +static const ahd_reg_parse_entry_t RCVRBIOSCTL_parse_table[] = { { "RCVRMANVAL", 0x3f, 0x3f }, { "AUTORBCDIS", 0x80, 0x80 } }; @@ -2868,7 +2286,7 @@ ahd_dfbkptr_print(u_int regvalue, u_int 0xc9, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DFDBCTL_parse_table[] = { +static const ahd_reg_parse_entry_t DFDBCTL_parse_table[] = { { "DFF_RAMBIST_EN", 0x01, 0x01 }, { "DFF_RAMBIST_DONE", 0x02, 0x02 }, { "DFF_RAMBIST_FAIL", 0x04, 0x04 }, @@ -2905,25 +2323,7 @@ ahd_ovlyaddr_print(u_int regvalue, u_int 0xd4, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SEQCTL0_parse_table[] = { - { "LOADRAM", 0x01, 0x01 }, - { "SEQRESET", 0x02, 0x02 }, - { "STEP", 0x04, 0x04 }, - { "BRKADRINTEN", 0x08, 0x08 }, - { "FASTMODE", 0x10, 0x10 }, - { "FAILDIS", 0x20, 0x20 }, - { "PAUSEDIS", 0x40, 0x40 }, - { "PERRORDIS", 0x80, 0x80 } -}; - -int -ahd_seqctl0_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SEQCTL0_parse_table, 8, "SEQCTL0", - 0xd6, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SEQCTL1_parse_table[] = { +static const ahd_reg_parse_entry_t SEQCTL1_parse_table[] = { { "RAMBIST_EN", 0x01, 0x01 }, { "RAMBIST_FAIL", 0x02, 0x02 }, { "RAMBIST_DONE", 0x04, 0x04 }, @@ -2937,7 +2337,7 @@ ahd_seqctl1_print(u_int regvalue, u_int 0xd7, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t FLAGS_parse_table[] = { +static const ahd_reg_parse_entry_t FLAGS_parse_table[] = { { "CARRY", 0x01, 0x01 }, { "ZERO", 0x02, 0x02 } }; @@ -2949,23 +2349,6 @@ ahd_flags_print(u_int regvalue, u_int *c 0xd8, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SEQINTCTL_parse_table[] = { - { "IRET", 0x01, 0x01 }, - { "INTMASK1", 0x02, 0x02 }, - { "INTMASK2", 0x04, 0x04 }, - { "SCS_SEQ_INT1M0", 0x08, 0x08 }, - { "SCS_SEQ_INT1M1", 0x10, 0x10 }, - { "INT1_CONTEXT", 0x20, 0x20 }, - { "INTVEC1DSL", 0x80, 0x80 } -}; - -int -ahd_seqintctl_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SEQINTCTL_parse_table, 7, "SEQINTCTL", - 0xd9, regvalue, cur_col, wrap)); -} - int ahd_seqram_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -3008,7 +2391,7 @@ ahd_brkaddr0_print(u_int regvalue, u_int 0xe6, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t BRKADDR1_parse_table[] = { +static const ahd_reg_parse_entry_t BRKADDR1_parse_table[] = { { "BRKDIS", 0x80, 0x80 } }; @@ -3188,34 +2571,13 @@ ahd_complete_on_qfreeze_head_print(u_int } int -ahd_qfreeze_count_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(NULL, 0, "QFREEZE_COUNT", - 0x132, regvalue, cur_col, wrap)); -} - -int -ahd_kernel_qfreeze_count_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(NULL, 0, "KERNEL_QFREEZE_COUNT", - 0x134, regvalue, cur_col, wrap)); -} - -int -ahd_saved_mode_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(NULL, 0, "SAVED_MODE", - 0x136, regvalue, cur_col, wrap)); -} - -int ahd_msg_out_print(u_int regvalue, u_int *cur_col, u_int wrap) { return (ahd_print_register(NULL, 0, "MSG_OUT", 0x137, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t DMAPARAMS_parse_table[] = { +static const ahd_reg_parse_entry_t DMAPARAMS_parse_table[] = { { "FIFORESET", 0x01, 0x01 }, { "FIFOFLUSH", 0x02, 0x02 }, { "DIRECTION", 0x04, 0x04 }, @@ -3235,25 +2597,6 @@ ahd_dmaparams_print(u_int regvalue, u_in 0x138, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SEQ_FLAGS_parse_table[] = { - { "NO_DISCONNECT", 0x01, 0x01 }, - { "SPHASE_PENDING", 0x02, 0x02 }, - { "DPHASE_PENDING", 0x04, 0x04 }, - { "CMDPHASE_PENDING", 0x08, 0x08 }, - { "TARG_CMD_PENDING", 0x10, 0x10 }, - { "DPHASE", 0x20, 0x20 }, - { "NO_CDB_SENT", 0x40, 0x40 }, - { "TARGET_CMD_IS_TAGGED",0x40, 0x40 }, - { "NOT_IDENTIFIED", 0x80, 0x80 } -}; - -int -ahd_seq_flags_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SEQ_FLAGS_parse_table, 9, "SEQ_FLAGS", - 0x139, regvalue, cur_col, wrap)); -} - int ahd_saved_scsiid_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -3268,29 +2611,6 @@ ahd_saved_lun_print(u_int regvalue, u_in 0x13b, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t LASTPHASE_parse_table[] = { - { "P_DATAOUT", 0x00, 0xe0 }, - { "P_DATAOUT_DT", 0x20, 0xe0 }, - { "P_DATAIN", 0x40, 0xe0 }, - { "P_DATAIN_DT", 0x60, 0xe0 }, - { "P_COMMAND", 0x80, 0xe0 }, - { "P_MESGOUT", 0xa0, 0xe0 }, - { "P_STATUS", 0xc0, 0xe0 }, - { "P_MESGIN", 0xe0, 0xe0 }, - { "P_BUSFREE", 0x01, 0x01 }, - { "MSGI", 0x20, 0x20 }, - { "IOI", 0x40, 0x40 }, - { "CDI", 0x80, 0x80 }, - { "PHASE_MASK", 0xe0, 0xe0 } -}; - -int -ahd_lastphase_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(LASTPHASE_parse_table, 13, "LASTPHASE", - 0x13c, regvalue, cur_col, wrap)); -} - int ahd_qoutfifo_entry_valid_tag_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -3326,7 +2646,7 @@ ahd_qoutfifo_next_addr_print(u_int regva 0x144, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t ARG_1_parse_table[] = { +static const ahd_reg_parse_entry_t ARG_1_parse_table[] = { { "CONT_MSG_LOOP_TARG", 0x02, 0x02 }, { "CONT_MSG_LOOP_READ", 0x03, 0x03 }, { "CONT_MSG_LOOP_WRITE",0x04, 0x04 }, @@ -3358,7 +2678,7 @@ ahd_last_msg_print(u_int regvalue, u_int 0x14a, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCSISEQ_TEMPLATE_parse_table[] = { +static const ahd_reg_parse_entry_t SCSISEQ_TEMPLATE_parse_table[] = { { "ALTSTIM", 0x01, 0x01 }, { "ENAUTOATNP", 0x02, 0x02 }, { "MANUALP", 0x0c, 0x0c }, @@ -3381,19 +2701,6 @@ ahd_initiator_tag_print(u_int regvalue, 0x14c, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SEQ_FLAGS2_parse_table[] = { - { "PENDING_MK_MESSAGE", 0x01, 0x01 }, - { "TARGET_MSG_PENDING", 0x02, 0x02 }, - { "SELECTOUT_QFROZEN", 0x04, 0x04 } -}; - -int -ahd_seq_flags2_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SEQ_FLAGS2_parse_table, 3, "SEQ_FLAGS2", - 0x14d, regvalue, cur_col, wrap)); -} - int ahd_allocfifo_scbptr_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -3451,20 +2758,6 @@ ahd_cmdsize_table_print(u_int regvalue, } int -ahd_mk_message_scb_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(NULL, 0, "MK_MESSAGE_SCB", - 0x160, regvalue, cur_col, wrap)); -} - -int -ahd_mk_message_scsiid_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(NULL, 0, "MK_MESSAGE_SCSIID", - 0x162, regvalue, cur_col, wrap)); -} - -int ahd_scb_base_print(u_int regvalue, u_int *cur_col, u_int wrap) { return (ahd_print_register(NULL, 0, "SCB_BASE", @@ -3478,7 +2771,7 @@ ahd_scb_residual_datacnt_print(u_int reg 0x180, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCB_RESIDUAL_SGPTR_parse_table[] = { +static const ahd_reg_parse_entry_t SCB_RESIDUAL_SGPTR_parse_table[] = { { "SG_LIST_NULL", 0x01, 0x01 }, { "SG_OVERRUN_RESID", 0x02, 0x02 }, { "SG_ADDR_MASK", 0xf8, 0xf8 } @@ -3533,36 +2826,7 @@ ahd_scb_tag_print(u_int regvalue, u_int 0x190, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCB_CONTROL_parse_table[] = { - { "SCB_TAG_TYPE", 0x03, 0x03 }, - { "DISCONNECTED", 0x04, 0x04 }, - { "STATUS_RCVD", 0x08, 0x08 }, - { "MK_MESSAGE", 0x10, 0x10 }, - { "TAG_ENB", 0x20, 0x20 }, - { "DISCENB", 0x40, 0x40 }, - { "TARGET_SCB", 0x80, 0x80 } -}; - -int -ahd_scb_control_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SCB_CONTROL_parse_table, 7, "SCB_CONTROL", - 0x192, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SCB_SCSIID_parse_table[] = { - { "OID", 0x0f, 0x0f }, - { "TID", 0xf0, 0xf0 } -}; - -int -ahd_scb_scsiid_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahd_print_register(SCB_SCSIID_parse_table, 2, "SCB_SCSIID", - 0x193, regvalue, cur_col, wrap)); -} - -static ahd_reg_parse_entry_t SCB_LUN_parse_table[] = { +static const ahd_reg_parse_entry_t SCB_LUN_parse_table[] = { { "LID", 0xff, 0xff } }; @@ -3573,7 +2837,7 @@ ahd_scb_lun_print(u_int regvalue, u_int 0x194, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCB_TASK_ATTRIBUTE_parse_table[] = { +static const ahd_reg_parse_entry_t SCB_TASK_ATTRIBUTE_parse_table[] = { { "SCB_XFERLEN_ODD", 0x01, 0x01 } }; @@ -3584,7 +2848,7 @@ ahd_scb_task_attribute_print(u_int regva 0x195, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCB_CDB_LEN_parse_table[] = { +static const ahd_reg_parse_entry_t SCB_CDB_LEN_parse_table[] = { { "SCB_CDB_LEN_PTR", 0x80, 0x80 } }; @@ -3609,7 +2873,7 @@ ahd_scb_dataptr_print(u_int regvalue, u_ 0x198, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCB_DATACNT_parse_table[] = { +static const ahd_reg_parse_entry_t SCB_DATACNT_parse_table[] = { { "SG_HIGH_ADDR_BITS", 0x7f, 0x7f }, { "SG_LAST_SEG", 0x80, 0x80 } }; @@ -3621,7 +2885,7 @@ ahd_scb_datacnt_print(u_int regvalue, u_ 0x1a0, regvalue, cur_col, wrap)); } -static ahd_reg_parse_entry_t SCB_SGPTR_parse_table[] = { +static const ahd_reg_parse_entry_t SCB_SGPTR_parse_table[] = { { "SG_LIST_NULL", 0x01, 0x01 }, { "SG_FULL_RESID", 0x02, 0x02 }, { "SG_STATUS_VALID", 0x04, 0x04 } @@ -3669,3 +2933,741 @@ ahd_scb_disconnected_lists_print(u_int r 0x1b8, regvalue, cur_col, wrap)); } +static const ahd_reg_parse_entry_t CLRSINT1_parse_table[] = { + { "CLRREQINIT", 0x01, 0x01 }, + { "CLRSTRB2FAST", 0x02, 0x02 }, + { "CLRSCSIPERR", 0x04, 0x04 }, + { "CLRBUSFREE", 0x08, 0x08 }, + { "CLRSCSIRSTI", 0x20, 0x20 }, + { "CLRATNO", 0x40, 0x40 }, + { "CLRSELTIMEO", 0x80, 0x80 } +}; + +int +ahd_clrsint1_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(CLRSINT1_parse_table, 7, "CLRSINT1", + 0x4c, regvalue, cur_col, wrap)); +} +#endif /* unused */ + +static const ahd_reg_parse_entry_t INTSTAT_parse_table[] = { + { "SPLTINT", 0x01, 0x01 }, + { "CMDCMPLT", 0x02, 0x02 }, + { "SEQINT", 0x04, 0x04 }, + { "SCSIINT", 0x08, 0x08 }, + { "PCIINT", 0x10, 0x10 }, + { "SWTMINT", 0x20, 0x20 }, + { "BRKADRINT", 0x40, 0x40 }, + { "HWERRINT", 0x80, 0x80 }, + { "INT_PEND", 0xff, 0xff } +}; + +int +ahd_intstat_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(INTSTAT_parse_table, 9, "INTSTAT", + 0x01, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t HS_MAILBOX_parse_table[] = { + { "ENINT_COALESCE", 0x40, 0x40 }, + { "HOST_TQINPOS", 0x80, 0x80 } +}; + +int +ahd_hs_mailbox_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(HS_MAILBOX_parse_table, 2, "HS_MAILBOX", + 0x0b, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SEQINTSTAT_parse_table[] = { + { "SEQ_SPLTINT", 0x01, 0x01 }, + { "SEQ_PCIINT", 0x02, 0x02 }, + { "SEQ_SCSIINT", 0x04, 0x04 }, + { "SEQ_SEQINT", 0x08, 0x08 }, + { "SEQ_SWTMRTO", 0x10, 0x10 } +}; + +int +ahd_seqintstat_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SEQINTSTAT_parse_table, 5, "SEQINTSTAT", + 0x0c, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t INTCTL_parse_table[] = { + { "SPLTINTEN", 0x01, 0x01 }, + { "SEQINTEN", 0x02, 0x02 }, + { "SCSIINTEN", 0x04, 0x04 }, + { "PCIINTEN", 0x08, 0x08 }, + { "AUTOCLRCMDINT", 0x10, 0x10 }, + { "SWTIMER_START", 0x20, 0x20 }, + { "SWTMINTEN", 0x40, 0x40 }, + { "SWTMINTMASK", 0x80, 0x80 } +}; + +int +ahd_intctl_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(INTCTL_parse_table, 8, "INTCTL", + 0x18, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t DFCNTRL_parse_table[] = { + { "DIRECTIONEN", 0x01, 0x01 }, + { "FIFOFLUSH", 0x02, 0x02 }, + { "FIFOFLUSHACK", 0x02, 0x02 }, + { "DIRECTION", 0x04, 0x04 }, + { "DIRECTIONACK", 0x04, 0x04 }, + { "HDMAEN", 0x08, 0x08 }, + { "HDMAENACK", 0x08, 0x08 }, + { "SCSIEN", 0x20, 0x20 }, + { "SCSIENACK", 0x20, 0x20 }, + { "SCSIENWRDIS", 0x40, 0x40 }, + { "PRELOADEN", 0x80, 0x80 } +}; + +int +ahd_dfcntrl_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(DFCNTRL_parse_table, 11, "DFCNTRL", + 0x19, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t DFSTATUS_parse_table[] = { + { "FIFOEMP", 0x01, 0x01 }, + { "FIFOFULL", 0x02, 0x02 }, + { "DFTHRESH", 0x04, 0x04 }, + { "HDONE", 0x08, 0x08 }, + { "MREQPEND", 0x10, 0x10 }, + { "PKT_PRELOAD_AVAIL", 0x40, 0x40 }, + { "PRELOAD_AVAIL", 0x80, 0x80 } +}; + +int +ahd_dfstatus_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(DFSTATUS_parse_table, 7, "DFSTATUS", + 0x1a, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SG_CACHE_SHADOW_parse_table[] = { + { "LAST_SEG_DONE", 0x01, 0x01 }, + { "LAST_SEG", 0x02, 0x02 }, + { "ODD_SEG", 0x04, 0x04 }, + { "SG_ADDR_MASK", 0xf8, 0xf8 } +}; + +int +ahd_sg_cache_shadow_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SG_CACHE_SHADOW_parse_table, 4, "SG_CACHE_SHADOW", + 0x1b, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SCSISEQ0_parse_table[] = { + { "SCSIRSTO", 0x01, 0x01 }, + { "FORCEBUSFREE", 0x10, 0x10 }, + { "ENARBO", 0x20, 0x20 }, + { "ENSELO", 0x40, 0x40 }, + { "TEMODEO", 0x80, 0x80 } +}; + +int +ahd_scsiseq0_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SCSISEQ0_parse_table, 5, "SCSISEQ0", + 0x3a, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SCSISEQ1_parse_table[] = { + { "ALTSTIM", 0x01, 0x01 }, + { "ENAUTOATNP", 0x02, 0x02 }, + { "MANUALP", 0x0c, 0x0c }, + { "ENRSELI", 0x10, 0x10 }, + { "ENSELI", 0x20, 0x20 }, + { "MANUALCTL", 0x40, 0x40 } +}; + +int +ahd_scsiseq1_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SCSISEQ1_parse_table, 6, "SCSISEQ1", + 0x3b, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t DFFSTAT_parse_table[] = { + { "CURRFIFO_0", 0x00, 0x03 }, + { "CURRFIFO_1", 0x01, 0x03 }, + { "CURRFIFO_NONE", 0x03, 0x03 }, + { "FIFO0FREE", 0x10, 0x10 }, + { "FIFO1FREE", 0x20, 0x20 }, + { "CURRFIFO", 0x03, 0x03 } +}; + +int +ahd_dffstat_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(DFFSTAT_parse_table, 6, "DFFSTAT", + 0x3f, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SCSISIGI_parse_table[] = { + { "P_DATAOUT", 0x00, 0xe0 }, + { "P_DATAOUT_DT", 0x20, 0xe0 }, + { "P_DATAIN", 0x40, 0xe0 }, + { "P_DATAIN_DT", 0x60, 0xe0 }, + { "P_COMMAND", 0x80, 0xe0 }, + { "P_MESGOUT", 0xa0, 0xe0 }, + { "P_STATUS", 0xc0, 0xe0 }, + { "P_MESGIN", 0xe0, 0xe0 }, + { "ACKI", 0x01, 0x01 }, + { "REQI", 0x02, 0x02 }, + { "BSYI", 0x04, 0x04 }, + { "SELI", 0x08, 0x08 }, + { "ATNI", 0x10, 0x10 }, + { "MSGI", 0x20, 0x20 }, + { "IOI", 0x40, 0x40 }, + { "CDI", 0x80, 0x80 }, + { "PHASE_MASK", 0xe0, 0xe0 } +}; + +int +ahd_scsisigi_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SCSISIGI_parse_table, 17, "SCSISIGI", + 0x41, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SCSIPHASE_parse_table[] = { + { "DATA_OUT_PHASE", 0x01, 0x03 }, + { "DATA_IN_PHASE", 0x02, 0x03 }, + { "DATA_PHASE_MASK", 0x03, 0x03 }, + { "MSG_OUT_PHASE", 0x04, 0x04 }, + { "MSG_IN_PHASE", 0x08, 0x08 }, + { "COMMAND_PHASE", 0x10, 0x10 }, + { "STATUS_PHASE", 0x20, 0x20 } +}; + +int +ahd_scsiphase_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SCSIPHASE_parse_table, 7, "SCSIPHASE", + 0x42, regvalue, cur_col, wrap)); +} + +int +ahd_scsibus_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(NULL, 0, "SCSIBUS", + 0x46, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SELID_parse_table[] = { + { "ONEBIT", 0x08, 0x08 }, + { "SELID_MASK", 0xf0, 0xf0 } +}; + +int +ahd_selid_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SELID_parse_table, 2, "SELID", + 0x49, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SSTAT0_parse_table[] = { + { "ARBDO", 0x01, 0x01 }, + { "SPIORDY", 0x02, 0x02 }, + { "OVERRUN", 0x04, 0x04 }, + { "IOERR", 0x08, 0x08 }, + { "SELINGO", 0x10, 0x10 }, + { "SELDI", 0x20, 0x20 }, + { "SELDO", 0x40, 0x40 }, + { "TARGET", 0x80, 0x80 } +}; + +int +ahd_sstat0_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SSTAT0_parse_table, 8, "SSTAT0", + 0x4b, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SIMODE0_parse_table[] = { + { "ENARBDO", 0x01, 0x01 }, + { "ENSPIORDY", 0x02, 0x02 }, + { "ENOVERRUN", 0x04, 0x04 }, + { "ENIOERR", 0x08, 0x08 }, + { "ENSELINGO", 0x10, 0x10 }, + { "ENSELDI", 0x20, 0x20 }, + { "ENSELDO", 0x40, 0x40 } +}; + +int +ahd_simode0_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SIMODE0_parse_table, 7, "SIMODE0", + 0x4b, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SSTAT1_parse_table[] = { + { "REQINIT", 0x01, 0x01 }, + { "STRB2FAST", 0x02, 0x02 }, + { "SCSIPERR", 0x04, 0x04 }, + { "BUSFREE", 0x08, 0x08 }, + { "PHASEMIS", 0x10, 0x10 }, + { "SCSIRSTI", 0x20, 0x20 }, + { "ATNTARG", 0x40, 0x40 }, + { "SELTO", 0x80, 0x80 } +}; + +int +ahd_sstat1_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SSTAT1_parse_table, 8, "SSTAT1", + 0x4c, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SSTAT2_parse_table[] = { + { "BUSFREE_LQO", 0x40, 0xc0 }, + { "BUSFREE_DFF0", 0x80, 0xc0 }, + { "BUSFREE_DFF1", 0xc0, 0xc0 }, + { "DMADONE", 0x01, 0x01 }, + { "SDONE", 0x02, 0x02 }, + { "WIDE_RES", 0x04, 0x04 }, + { "BSYX", 0x08, 0x08 }, + { "EXP_ACTIVE", 0x10, 0x10 }, + { "NONPACKREQ", 0x20, 0x20 }, + { "BUSFREETIME", 0xc0, 0xc0 } +}; + +int +ahd_sstat2_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SSTAT2_parse_table, 10, "SSTAT2", + 0x4d, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t PERRDIAG_parse_table[] = { + { "DTERR", 0x01, 0x01 }, + { "DGFORMERR", 0x02, 0x02 }, + { "CRCERR", 0x04, 0x04 }, + { "AIPERR", 0x08, 0x08 }, + { "PARITYERR", 0x10, 0x10 }, + { "PREVPHASE", 0x20, 0x20 }, + { "HIPERR", 0x40, 0x40 }, + { "HIZERO", 0x80, 0x80 } +}; + +int +ahd_perrdiag_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(PERRDIAG_parse_table, 8, "PERRDIAG", + 0x4e, regvalue, cur_col, wrap)); +} + +int +ahd_soffcnt_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(NULL, 0, "SOFFCNT", + 0x4f, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t LQISTAT0_parse_table[] = { + { "LQIATNCMD", 0x01, 0x01 }, + { "LQIATNLQ", 0x02, 0x02 }, + { "LQIBADLQT", 0x04, 0x04 }, + { "LQICRCT2", 0x08, 0x08 }, + { "LQICRCT1", 0x10, 0x10 }, + { "LQIATNQAS", 0x20, 0x20 } +}; + +int +ahd_lqistat0_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(LQISTAT0_parse_table, 6, "LQISTAT0", + 0x50, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t LQISTAT1_parse_table[] = { + { "LQIOVERI_NLQ", 0x01, 0x01 }, + { "LQIOVERI_LQ", 0x02, 0x02 }, + { "LQIBADLQI", 0x04, 0x04 }, + { "LQICRCI_NLQ", 0x08, 0x08 }, + { "LQICRCI_LQ", 0x10, 0x10 }, + { "LQIABORT", 0x20, 0x20 }, + { "LQIPHASE_NLQ", 0x40, 0x40 }, + { "LQIPHASE_LQ", 0x80, 0x80 } +}; + +int +ahd_lqistat1_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(LQISTAT1_parse_table, 8, "LQISTAT1", + 0x51, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t LQISTAT2_parse_table[] = { + { "LQIGSAVAIL", 0x01, 0x01 }, + { "LQISTOPCMD", 0x02, 0x02 }, + { "LQISTOPLQ", 0x04, 0x04 }, + { "LQISTOPPKT", 0x08, 0x08 }, + { "LQIWAITFIFO", 0x10, 0x10 }, + { "LQIWORKONLQ", 0x20, 0x20 }, + { "LQIPHASE_OUTPKT", 0x40, 0x40 }, + { "PACKETIZED", 0x80, 0x80 } +}; + +int +ahd_lqistat2_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(LQISTAT2_parse_table, 8, "LQISTAT2", + 0x52, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SSTAT3_parse_table[] = { + { "OSRAMPERR", 0x01, 0x01 }, + { "NTRAMPERR", 0x02, 0x02 } +}; + +int +ahd_sstat3_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SSTAT3_parse_table, 2, "SSTAT3", + 0x53, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t LQOSTAT0_parse_table[] = { + { "LQOTCRC", 0x01, 0x01 }, + { "LQOATNPKT", 0x02, 0x02 }, + { "LQOATNLQ", 0x04, 0x04 }, + { "LQOSTOPT2", 0x08, 0x08 }, + { "LQOTARGSCBPERR", 0x10, 0x10 } +}; + +int +ahd_lqostat0_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(LQOSTAT0_parse_table, 5, "LQOSTAT0", + 0x54, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t LQOSTAT1_parse_table[] = { + { "LQOPHACHGINPKT", 0x01, 0x01 }, + { "LQOBUSFREE", 0x02, 0x02 }, + { "LQOBADQAS", 0x04, 0x04 }, + { "LQOSTOPI2", 0x08, 0x08 }, + { "LQOINITSCBPERR", 0x10, 0x10 } +}; + +int +ahd_lqostat1_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(LQOSTAT1_parse_table, 5, "LQOSTAT1", + 0x55, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t LQOSTAT2_parse_table[] = { + { "LQOSTOP0", 0x01, 0x01 }, + { "LQOPHACHGOUTPKT", 0x02, 0x02 }, + { "LQOWAITFIFO", 0x10, 0x10 }, + { "LQOPKT", 0xe0, 0xe0 } +}; + +int +ahd_lqostat2_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(LQOSTAT2_parse_table, 4, "LQOSTAT2", + 0x56, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SIMODE1_parse_table[] = { + { "ENREQINIT", 0x01, 0x01 }, + { "ENSTRB2FAST", 0x02, 0x02 }, + { "ENSCSIPERR", 0x04, 0x04 }, + { "ENBUSFREE", 0x08, 0x08 }, + { "ENPHASEMIS", 0x10, 0x10 }, + { "ENSCSIRST", 0x20, 0x20 }, + { "ENATNTARG", 0x40, 0x40 }, + { "ENSELTIMO", 0x80, 0x80 } +}; + +int +ahd_simode1_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SIMODE1_parse_table, 8, "SIMODE1", + 0x57, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t DFFSXFRCTL_parse_table[] = { + { "RSTCHN", 0x01, 0x01 }, + { "CLRCHN", 0x02, 0x02 }, + { "CLRSHCNT", 0x04, 0x04 }, + { "DFFBITBUCKET", 0x08, 0x08 } +}; + +int +ahd_dffsxfrctl_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(DFFSXFRCTL_parse_table, 4, "DFFSXFRCTL", + 0x5a, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SEQINTSRC_parse_table[] = { + { "CFG4TCMD", 0x01, 0x01 }, + { "CFG4ICMD", 0x02, 0x02 }, + { "CFG4TSTAT", 0x04, 0x04 }, + { "CFG4ISTAT", 0x08, 0x08 }, + { "CFG4DATA", 0x10, 0x10 }, + { "SAVEPTRS", 0x20, 0x20 }, + { "CTXTDONE", 0x40, 0x40 } +}; + +int +ahd_seqintsrc_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SEQINTSRC_parse_table, 7, "SEQINTSRC", + 0x5b, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SEQIMODE_parse_table[] = { + { "ENCFG4TCMD", 0x01, 0x01 }, + { "ENCFG4ICMD", 0x02, 0x02 }, + { "ENCFG4TSTAT", 0x04, 0x04 }, + { "ENCFG4ISTAT", 0x08, 0x08 }, + { "ENCFG4DATA", 0x10, 0x10 }, + { "ENSAVEPTRS", 0x20, 0x20 }, + { "ENCTXTDONE", 0x40, 0x40 } +}; + +int +ahd_seqimode_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SEQIMODE_parse_table, 7, "SEQIMODE", + 0x5c, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t MDFFSTAT_parse_table[] = { + { "FIFOFREE", 0x01, 0x01 }, + { "DATAINFIFO", 0x02, 0x02 }, + { "DLZERO", 0x04, 0x04 }, + { "SHVALID", 0x08, 0x08 }, + { "LASTSDONE", 0x10, 0x10 }, + { "SHCNTMINUS1", 0x20, 0x20 }, + { "SHCNTNEGATIVE", 0x40, 0x40 } +}; + +int +ahd_mdffstat_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(MDFFSTAT_parse_table, 7, "MDFFSTAT", + 0x5d, regvalue, cur_col, wrap)); +} + +int +ahd_seloid_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(NULL, 0, "SELOID", + 0x6b, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SG_STATE_parse_table[] = { + { "SEGS_AVAIL", 0x01, 0x01 }, + { "LOADING_NEEDED", 0x02, 0x02 }, + { "FETCH_INPROG", 0x04, 0x04 } +}; + +int +ahd_sg_state_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SG_STATE_parse_table, 3, "SG_STATE", + 0xa6, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t CCSCBCTL_parse_table[] = { + { "CCSCBRESET", 0x01, 0x01 }, + { "CCSCBDIR", 0x04, 0x04 }, + { "CCSCBEN", 0x08, 0x08 }, + { "CCARREN", 0x10, 0x10 }, + { "ARRDONE", 0x40, 0x40 }, + { "CCSCBDONE", 0x80, 0x80 } +}; + +int +ahd_ccscbctl_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(CCSCBCTL_parse_table, 6, "CCSCBCTL", + 0xad, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t CCSGCTL_parse_table[] = { + { "CCSGRESET", 0x01, 0x01 }, + { "SG_FETCH_REQ", 0x02, 0x02 }, + { "CCSGENACK", 0x08, 0x08 }, + { "SG_CACHE_AVAIL", 0x10, 0x10 }, + { "CCSGDONE", 0x80, 0x80 }, + { "CCSGEN", 0x0c, 0x0c } +}; + +int +ahd_ccsgctl_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(CCSGCTL_parse_table, 6, "CCSGCTL", + 0xad, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SEQCTL0_parse_table[] = { + { "LOADRAM", 0x01, 0x01 }, + { "SEQRESET", 0x02, 0x02 }, + { "STEP", 0x04, 0x04 }, + { "BRKADRINTEN", 0x08, 0x08 }, + { "FASTMODE", 0x10, 0x10 }, + { "FAILDIS", 0x20, 0x20 }, + { "PAUSEDIS", 0x40, 0x40 }, + { "PERRORDIS", 0x80, 0x80 } +}; + +int +ahd_seqctl0_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SEQCTL0_parse_table, 8, "SEQCTL0", + 0xd6, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SEQINTCTL_parse_table[] = { + { "IRET", 0x01, 0x01 }, + { "INTMASK1", 0x02, 0x02 }, + { "INTMASK2", 0x04, 0x04 }, + { "SCS_SEQ_INT1M0", 0x08, 0x08 }, + { "SCS_SEQ_INT1M1", 0x10, 0x10 }, + { "INT1_CONTEXT", 0x20, 0x20 }, + { "INTVEC1DSL", 0x80, 0x80 } +}; + +int +ahd_seqintctl_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SEQINTCTL_parse_table, 7, "SEQINTCTL", + 0xd9, regvalue, cur_col, wrap)); +} + +int +ahd_qfreeze_count_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(NULL, 0, "QFREEZE_COUNT", + 0x132, regvalue, cur_col, wrap)); +} + +int +ahd_kernel_qfreeze_count_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(NULL, 0, "KERNEL_QFREEZE_COUNT", + 0x134, regvalue, cur_col, wrap)); +} + +int +ahd_saved_mode_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(NULL, 0, "SAVED_MODE", + 0x136, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SEQ_FLAGS_parse_table[] = { + { "NO_DISCONNECT", 0x01, 0x01 }, + { "SPHASE_PENDING", 0x02, 0x02 }, + { "DPHASE_PENDING", 0x04, 0x04 }, + { "CMDPHASE_PENDING", 0x08, 0x08 }, + { "TARG_CMD_PENDING", 0x10, 0x10 }, + { "DPHASE", 0x20, 0x20 }, + { "NO_CDB_SENT", 0x40, 0x40 }, + { "TARGET_CMD_IS_TAGGED",0x40, 0x40 }, + { "NOT_IDENTIFIED", 0x80, 0x80 } +}; + +int +ahd_seq_flags_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SEQ_FLAGS_parse_table, 9, "SEQ_FLAGS", + 0x139, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t LASTPHASE_parse_table[] = { + { "P_DATAOUT", 0x00, 0xe0 }, + { "P_DATAOUT_DT", 0x20, 0xe0 }, + { "P_DATAIN", 0x40, 0xe0 }, + { "P_DATAIN_DT", 0x60, 0xe0 }, + { "P_COMMAND", 0x80, 0xe0 }, + { "P_MESGOUT", 0xa0, 0xe0 }, + { "P_STATUS", 0xc0, 0xe0 }, + { "P_MESGIN", 0xe0, 0xe0 }, + { "P_BUSFREE", 0x01, 0x01 }, + { "MSGI", 0x20, 0x20 }, + { "IOI", 0x40, 0x40 }, + { "CDI", 0x80, 0x80 }, + { "PHASE_MASK", 0xe0, 0xe0 } +}; + +int +ahd_lastphase_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(LASTPHASE_parse_table, 13, "LASTPHASE", + 0x13c, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SEQ_FLAGS2_parse_table[] = { + { "PENDING_MK_MESSAGE", 0x01, 0x01 }, + { "TARGET_MSG_PENDING", 0x02, 0x02 }, + { "SELECTOUT_QFROZEN", 0x04, 0x04 } +}; + +int +ahd_seq_flags2_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SEQ_FLAGS2_parse_table, 3, "SEQ_FLAGS2", + 0x14d, regvalue, cur_col, wrap)); +} + +int +ahd_mk_message_scb_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(NULL, 0, "MK_MESSAGE_SCB", + 0x160, regvalue, cur_col, wrap)); +} + +int +ahd_mk_message_scsiid_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(NULL, 0, "MK_MESSAGE_SCSIID", + 0x162, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SCB_CONTROL_parse_table[] = { + { "SCB_TAG_TYPE", 0x03, 0x03 }, + { "DISCONNECTED", 0x04, 0x04 }, + { "STATUS_RCVD", 0x08, 0x08 }, + { "MK_MESSAGE", 0x10, 0x10 }, + { "TAG_ENB", 0x20, 0x20 }, + { "DISCENB", 0x40, 0x40 }, + { "TARGET_SCB", 0x80, 0x80 } +}; + +int +ahd_scb_control_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SCB_CONTROL_parse_table, 7, "SCB_CONTROL", + 0x192, regvalue, cur_col, wrap)); +} + +static const ahd_reg_parse_entry_t SCB_SCSIID_parse_table[] = { + { "OID", 0x0f, 0x0f }, + { "TID", 0xf0, 0xf0 } +}; + +int +ahd_scb_scsiid_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahd_print_register(SCB_SCSIID_parse_table, 2, "SCB_SCSIID", + 0x193, regvalue, cur_col, wrap)); +} diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped 2007-10-14 15:05:07.000000000 +0100 @@ -5,7 +5,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#120 $ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#77 $ */ -static uint8_t seqprog[] = { +static const uint8_t seqprog[] = { 0xff, 0x02, 0x06, 0x78, 0x00, 0xea, 0x6e, 0x59, 0x01, 0xea, 0x04, 0x30, diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx.h linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx.h --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx.h 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx.h 2007-10-14 15:05:07.000000000 +0100 @@ -736,7 +736,7 @@ struct ahc_syncrate { #define ST_SXFR 0x010 /* Rate Single Transition Only */ #define DT_SXFR 0x040 /* Rate Double Transition Only */ uint8_t period; /* Period to send to SCSI target */ - char *rate; + const char *rate; }; /* Safe and valid period for async negotiations. */ @@ -1143,10 +1143,6 @@ extern const int ahc_num_aic7770_devs; /*************************** Function Declarations ****************************/ /******************************************************************************/ -u_int ahc_index_busy_tcl(struct ahc_softc *ahc, u_int tcl); -void ahc_unbusy_tcl(struct ahc_softc *ahc, u_int tcl); -void ahc_busy_tcl(struct ahc_softc *ahc, - u_int tcl, u_int busyid); /***************************** PCI Front End *********************************/ struct ahc_pci_identity *ahc_find_pci_device(ahc_dev_softc_t); @@ -1162,9 +1158,6 @@ int aic7770_config(struct ahc_softc * /************************** SCB and SCB queue management **********************/ int ahc_probe_scbs(struct ahc_softc *); -void ahc_run_untagged_queues(struct ahc_softc *ahc); -void ahc_run_untagged_queue(struct ahc_softc *ahc, - struct scb_tailq *queue); void ahc_qinfifo_requeue_tail(struct ahc_softc *ahc, struct scb *scb); int ahc_match_scb(struct ahc_softc *ahc, struct scb *scb, @@ -1183,22 +1176,8 @@ int ahc_suspend(struct ahc_softc *ahc int ahc_resume(struct ahc_softc *ahc); void ahc_set_unit(struct ahc_softc *, int); void ahc_set_name(struct ahc_softc *, char *); -void ahc_alloc_scbs(struct ahc_softc *ahc); void ahc_free(struct ahc_softc *ahc); int ahc_reset(struct ahc_softc *ahc, int reinit); -void ahc_shutdown(void *arg); - -/*************************** Interrupt Services *******************************/ -void ahc_clear_intstat(struct ahc_softc *ahc); -void ahc_run_qoutfifo(struct ahc_softc *ahc); -#ifdef AHC_TARGET_MODE -void ahc_run_tqinfifo(struct ahc_softc *ahc, int paused); -#endif -void ahc_handle_brkadrint(struct ahc_softc *ahc); -void ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat); -void ahc_handle_scsiint(struct ahc_softc *ahc, - u_int intstat); -void ahc_clear_critical_section(struct ahc_softc *ahc); /***************************** Error Recovery *********************************/ typedef enum { @@ -1219,36 +1198,19 @@ int ahc_search_disc_list(struct ahc_so char channel, int lun, u_int tag, int stop_on_first, int remove, int save_state); -void ahc_freeze_devq(struct ahc_softc *ahc, struct scb *scb); int ahc_reset_channel(struct ahc_softc *ahc, char channel, int initiate_reset); -int ahc_abort_scbs(struct ahc_softc *ahc, int target, - char channel, int lun, u_int tag, - role_t role, uint32_t status); -void ahc_restart(struct ahc_softc *ahc); -void ahc_calc_residual(struct ahc_softc *ahc, - struct scb *scb); + /*************************** Utility Functions ********************************/ -struct ahc_phase_table_entry* - ahc_lookup_phase_entry(int phase); void ahc_compile_devinfo(struct ahc_devinfo *devinfo, u_int our_id, u_int target, u_int lun, char channel, role_t role); /************************** Transfer Negotiation ******************************/ -struct ahc_syncrate* ahc_find_syncrate(struct ahc_softc *ahc, u_int *period, +const struct ahc_syncrate* ahc_find_syncrate(struct ahc_softc *ahc, u_int *period, u_int *ppr_options, u_int maxsync); u_int ahc_find_period(struct ahc_softc *ahc, u_int scsirate, u_int maxsync); -void ahc_validate_offset(struct ahc_softc *ahc, - struct ahc_initiator_tinfo *tinfo, - struct ahc_syncrate *syncrate, - u_int *offset, int wide, - role_t role); -void ahc_validate_width(struct ahc_softc *ahc, - struct ahc_initiator_tinfo *tinfo, - u_int *bus_width, - role_t role); /* * Negotiation types. These are used to qualify if we should renegotiate * even if our goal and current transport parameters are identical. @@ -1268,7 +1230,7 @@ void ahc_set_width(struct ahc_softc *a u_int width, u_int type, int paused); void ahc_set_syncrate(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, - struct ahc_syncrate *syncrate, + const struct ahc_syncrate *syncrate, u_int period, u_int offset, u_int ppr_options, u_int type, int paused); @@ -1310,11 +1272,10 @@ extern uint32_t ahc_debug; #define AHC_SHOW_MASKED_ERRORS 0x1000 #define AHC_DEBUG_SEQUENCER 0x2000 #endif -void ahc_print_scb(struct scb *scb); void ahc_print_devinfo(struct ahc_softc *ahc, struct ahc_devinfo *dev); void ahc_dump_card_state(struct ahc_softc *ahc); -int ahc_print_register(ahc_reg_parse_entry_t *table, +int ahc_print_register(const ahc_reg_parse_entry_t *table, u_int num_entries, const char *name, u_int address, diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_core.c linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_core.c --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_core.c 2007-10-14 15:02:44.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_core.c 2007-10-14 15:05:07.000000000 +0100 @@ -51,8 +51,7 @@ #endif /***************************** Lookup Tables **********************************/ -char *ahc_chip_names[] = -{ +static const char *const ahc_chip_names[] = { "NONE", "aic7770", "aic7850", @@ -75,10 +74,10 @@ static const u_int num_chip_names = ARRA */ struct ahc_hard_error_entry { uint8_t errno; - char *errmesg; + const char *errmesg; }; -static struct ahc_hard_error_entry ahc_hard_errors[] = { +static const struct ahc_hard_error_entry ahc_hard_errors[] = { { ILLHADDR, "Illegal Host Access" }, { ILLSADDR, "Illegal Sequencer Address referrenced" }, { ILLOPCODE, "Illegal Opcode in sequencer program" }, @@ -90,7 +89,7 @@ static struct ahc_hard_error_entry ahc_h }; static const u_int num_errors = ARRAY_SIZE(ahc_hard_errors); -static struct ahc_phase_table_entry ahc_phase_table[] = +static const struct ahc_phase_table_entry ahc_phase_table[] = { { P_DATAOUT, MSG_NOOP, "in Data-out phase" }, { P_DATAIN, MSG_INITIATOR_DET_ERR, "in Data-in phase" }, @@ -115,7 +114,7 @@ static const u_int num_phases = ARRAY_SI * Provides a mapping of tranfer periods in ns to the proper value to * stick in the scsixfer reg. */ -static struct ahc_syncrate ahc_syncrates[] = +static const struct ahc_syncrate ahc_syncrates[] = { /* ultra2 fast/ultra period rate */ { 0x42, 0x000, 9, "80.0" }, @@ -148,7 +147,7 @@ static struct ahc_tmode_tstate* static void ahc_free_tstate(struct ahc_softc *ahc, u_int scsi_id, char channel, int force); #endif -static struct ahc_syncrate* +static const struct ahc_syncrate* ahc_devlimited_syncrate(struct ahc_softc *ahc, struct ahc_initiator_tinfo *, u_int *period, @@ -204,9 +203,9 @@ static void ahc_setup_target_msgin(stru #endif static bus_dmamap_callback_t ahc_dmamap_cb; -static void ahc_build_free_scb_list(struct ahc_softc *ahc); -static int ahc_init_scbdata(struct ahc_softc *ahc); -static void ahc_fini_scbdata(struct ahc_softc *ahc); +static void ahc_build_free_scb_list(struct ahc_softc *ahc); +static int ahc_init_scbdata(struct ahc_softc *ahc); +static void ahc_fini_scbdata(struct ahc_softc *ahc); static void ahc_qinfifo_requeue(struct ahc_softc *ahc, struct scb *prev_scb, struct scb *scb); @@ -238,6 +237,71 @@ static int ahc_handle_target_cmd(struct struct target_cmd *cmd); #endif +static u_int ahc_index_busy_tcl(struct ahc_softc *ahc, u_int tcl); +static void ahc_unbusy_tcl(struct ahc_softc *ahc, u_int tcl); +static void ahc_busy_tcl(struct ahc_softc *ahc, + u_int tcl, u_int busyid); + +/************************** SCB and SCB queue management **********************/ +static void ahc_run_untagged_queues(struct ahc_softc *ahc); +static void ahc_run_untagged_queue(struct ahc_softc *ahc, + struct scb_tailq *queue); + +/****************************** Initialization ********************************/ +static void ahc_alloc_scbs(struct ahc_softc *ahc); +static void ahc_shutdown(void *arg); + +/*************************** Interrupt Services *******************************/ +static void ahc_clear_intstat(struct ahc_softc *ahc); +static void ahc_run_qoutfifo(struct ahc_softc *ahc); +#ifdef AHC_TARGET_MODE +static void ahc_run_tqinfifo(struct ahc_softc *ahc, int paused); +#endif +static void ahc_handle_brkadrint(struct ahc_softc *ahc); +static void ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat); +static void ahc_handle_scsiint(struct ahc_softc *ahc, + u_int intstat); +static void ahc_clear_critical_section(struct ahc_softc *ahc); + +/***************************** Error Recovery *********************************/ +static void ahc_freeze_devq(struct ahc_softc *ahc, struct scb *scb); +static int ahc_abort_scbs(struct ahc_softc *ahc, int target, + char channel, int lun, u_int tag, + role_t role, uint32_t status); +static void ahc_calc_residual(struct ahc_softc *ahc, + struct scb *scb); + +/*********************** Untagged Transaction Routines ************************/ +static inline void ahc_freeze_untagged_queues(struct ahc_softc *ahc); +static inline void ahc_release_untagged_queues(struct ahc_softc *ahc); + +/* + * Block our completion routine from starting the next untagged + * transaction for this target or target lun. + */ +static inline void +ahc_freeze_untagged_queues(struct ahc_softc *ahc) +{ + if ((ahc->flags & AHC_SCB_BTT) == 0) + ahc->untagged_queue_lock++; +} + +/* + * Allow the next untagged transaction for this target or target lun + * to be executed. We use a counting semaphore to allow the lock + * to be acquired recursively. Once the count drops to zero, the + * transaction queues will be run. + */ +static inline void +ahc_release_untagged_queues(struct ahc_softc *ahc) +{ + if ((ahc->flags & AHC_SCB_BTT) == 0) { + ahc->untagged_queue_lock--; + if (ahc->untagged_queue_lock == 0) + ahc_run_untagged_queues(ahc); + } +} + /************************* Sequencer Execution Control ************************/ /* * Work around any chip bugs related to halting sequencer execution. @@ -247,7 +311,7 @@ static int ahc_handle_target_cmd(struct * manual pause while accessing scb ram, accesses to certain registers * will hang the system (infinite pci retries). */ -void +static void ahc_pause_bug_fix(struct ahc_softc *ahc) { if ((ahc->features & AHC_ULTRA2) != 0) @@ -304,7 +368,7 @@ ahc_unpause(struct ahc_softc *ahc) } /************************** Memory mapping routines ***************************/ -struct ahc_dma_seg * +static struct ahc_dma_seg * ahc_sg_bus_to_virt(struct scb *scb, uint32_t sg_busaddr) { int sg_index; @@ -316,7 +380,7 @@ ahc_sg_bus_to_virt(struct scb *scb, uint return (&scb->sg_list[sg_index]); } -uint32_t +static uint32_t ahc_sg_virt_to_bus(struct scb *scb, struct ahc_dma_seg *sg) { int sg_index; @@ -327,14 +391,14 @@ ahc_sg_virt_to_bus(struct scb *scb, stru return (scb->sg_list_phys + (sg_index * sizeof(*scb->sg_list))); } -uint32_t +static uint32_t ahc_hscb_busaddr(struct ahc_softc *ahc, u_int index) { return (ahc->scb_data->hscb_busaddr + (sizeof(struct hardware_scb) * index)); } -void +static void ahc_sync_scb(struct ahc_softc *ahc, struct scb *scb, int op) { ahc_dmamap_sync(ahc, ahc->scb_data->hscb_dmat, @@ -355,18 +419,20 @@ ahc_sync_sglist(struct ahc_softc *ahc, s /*len*/sizeof(struct ahc_dma_seg) * scb->sg_count, op); } -uint32_t +#ifdef AHC_TARGET_MODE +static uint32_t ahc_targetcmd_offset(struct ahc_softc *ahc, u_int index) { return (((uint8_t *)&ahc->targetcmds[index]) - ahc->qoutfifo); } +#endif /*********************** Miscelaneous Support Functions ***********************/ /* * Determine whether the sequencer reported a residual * for this SCB/transaction. */ -void +static void ahc_update_residual(struct ahc_softc *ahc, struct scb *scb) { uint32_t sgptr; @@ -504,7 +570,7 @@ ahc_lookup_scb(struct ahc_softc *ahc, u_ return (scb); } -void +static void ahc_swap_with_next_hscb(struct ahc_softc *ahc, struct scb *scb) { struct hardware_scb *q_hscb; @@ -593,7 +659,7 @@ ahc_get_sense_buf(struct ahc_softc *ahc, return (&ahc->scb_data->sense[offset]); } -uint32_t +static uint32_t ahc_get_sense_bufaddr(struct ahc_softc *ahc, struct scb *scb) { int offset; @@ -604,14 +670,14 @@ ahc_get_sense_bufaddr(struct ahc_softc * } /************************** Interrupt Processing ******************************/ -void +static void ahc_sync_qoutfifo(struct ahc_softc *ahc, int op) { ahc_dmamap_sync(ahc, ahc->shared_data_dmat, ahc->shared_data_dmamap, /*offset*/0, /*len*/256, op); } -void +static void ahc_sync_tqinfifo(struct ahc_softc *ahc, int op) { #ifdef AHC_TARGET_MODE @@ -631,7 +697,7 @@ ahc_sync_tqinfifo(struct ahc_softc *ahc, */ #define AHC_RUN_QOUTFIFO 0x1 #define AHC_RUN_TQINFIFO 0x2 -u_int +static u_int ahc_check_cmdcmpltqueues(struct ahc_softc *ahc) { u_int retval; @@ -745,7 +811,7 @@ ahc_intr(struct ahc_softc *ahc) /* * Restart the sequencer program from address zero */ -void +static void ahc_restart(struct ahc_softc *ahc) { @@ -806,7 +872,7 @@ ahc_restart(struct ahc_softc *ahc) } /************************* Input/Output Queues ********************************/ -void +static void ahc_run_qoutfifo(struct ahc_softc *ahc) { struct scb *scb; @@ -853,7 +919,7 @@ ahc_run_qoutfifo(struct ahc_softc *ahc) } } -void +static void ahc_run_untagged_queues(struct ahc_softc *ahc) { int i; @@ -862,7 +928,7 @@ ahc_run_untagged_queues(struct ahc_softc ahc_run_untagged_queue(ahc, &ahc->untagged_queues[i]); } -void +static void ahc_run_untagged_queue(struct ahc_softc *ahc, struct scb_tailq *queue) { struct scb *scb; @@ -878,7 +944,7 @@ ahc_run_untagged_queue(struct ahc_softc } /************************* Interrupt Handling *********************************/ -void +static void ahc_handle_brkadrint(struct ahc_softc *ahc) { /* @@ -907,7 +973,7 @@ ahc_handle_brkadrint(struct ahc_softc *a ahc_shutdown(ahc); } -void +static void ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) { struct scb *scb; @@ -1457,7 +1523,7 @@ unpause: ahc_unpause(ahc); } -void +static void ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) { u_int scb_index; @@ -1910,7 +1976,7 @@ ahc_force_renegotiation(struct ahc_softc } #define AHC_MAX_STEPS 2000 -void +static void ahc_clear_critical_section(struct ahc_softc *ahc) { int stepping; @@ -2003,7 +2069,7 @@ ahc_clear_critical_section(struct ahc_so /* * Clear any pending interrupt status. */ -void +static void ahc_clear_intstat(struct ahc_softc *ahc) { /* Clear any interrupt conditions this may have caused */ @@ -2022,7 +2088,8 @@ ahc_clear_intstat(struct ahc_softc *ahc) uint32_t ahc_debug = AHC_DEBUG_OPTS; #endif -void +#if 0 /* unused */ +static void ahc_print_scb(struct scb *scb) { int i; @@ -2054,6 +2121,7 @@ ahc_print_scb(struct scb *scb) } } } +#endif /************************* Transfer Negotiation *******************************/ /* @@ -2137,7 +2205,7 @@ ahc_free_tstate(struct ahc_softc *ahc, u * by the capabilities of the bus connectivity of and sync settings for * the target. */ -struct ahc_syncrate * +const struct ahc_syncrate * ahc_devlimited_syncrate(struct ahc_softc *ahc, struct ahc_initiator_tinfo *tinfo, u_int *period, u_int *ppr_options, role_t role) @@ -2192,11 +2260,11 @@ ahc_devlimited_syncrate(struct ahc_softc * Return the period and offset that should be sent to the target * if this was the beginning of an SDTR. */ -struct ahc_syncrate * +const struct ahc_syncrate * ahc_find_syncrate(struct ahc_softc *ahc, u_int *period, u_int *ppr_options, u_int maxsync) { - struct ahc_syncrate *syncrate; + const struct ahc_syncrate *syncrate; if ((ahc->features & AHC_DT) == 0) *ppr_options &= ~MSG_EXT_PPR_DT_REQ; @@ -2271,7 +2339,7 @@ ahc_find_syncrate(struct ahc_softc *ahc, u_int ahc_find_period(struct ahc_softc *ahc, u_int scsirate, u_int maxsync) { - struct ahc_syncrate *syncrate; + const struct ahc_syncrate *syncrate; if ((ahc->features & AHC_ULTRA2) != 0) scsirate &= SXFR_ULTRA2; @@ -2309,10 +2377,10 @@ ahc_find_period(struct ahc_softc *ahc, u * Truncate the given synchronous offset to a value the * current adapter type and syncrate are capable of. */ -void +static void ahc_validate_offset(struct ahc_softc *ahc, struct ahc_initiator_tinfo *tinfo, - struct ahc_syncrate *syncrate, + const struct ahc_syncrate *syncrate, u_int *offset, int wide, role_t role) { u_int maxoffset; @@ -2341,7 +2409,7 @@ ahc_validate_offset(struct ahc_softc *ah * Truncate the given transfer width parameter to a value the * current adapter type is capable of. */ -void +static void ahc_validate_width(struct ahc_softc *ahc, struct ahc_initiator_tinfo *tinfo, u_int *bus_width, role_t role) { @@ -2416,7 +2484,7 @@ ahc_update_neg_request(struct ahc_softc */ void ahc_set_syncrate(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, - struct ahc_syncrate *syncrate, u_int period, + const struct ahc_syncrate *syncrate, u_int period, u_int offset, u_int ppr_options, u_int type, int paused) { struct ahc_initiator_tinfo *tinfo; @@ -2723,11 +2791,11 @@ ahc_fetch_devinfo(struct ahc_softc *ahc, role); } -struct ahc_phase_table_entry* +static const struct ahc_phase_table_entry* ahc_lookup_phase_entry(int phase) { - struct ahc_phase_table_entry *entry; - struct ahc_phase_table_entry *last_entry; + const struct ahc_phase_table_entry *entry; + const struct ahc_phase_table_entry *last_entry; /* * num_phases doesn't include the default entry which @@ -2893,7 +2961,7 @@ ahc_build_transfer_msg(struct ahc_softc */ struct ahc_initiator_tinfo *tinfo; struct ahc_tmode_tstate *tstate; - struct ahc_syncrate *rate; + const struct ahc_syncrate *rate; int dowide; int dosync; int doppr; @@ -3559,7 +3627,7 @@ ahc_parse_msg(struct ahc_softc *ahc, str switch (ahc->msgin_buf[2]) { case MSG_EXT_SDTR: { - struct ahc_syncrate *syncrate; + const struct ahc_syncrate *syncrate; u_int period; u_int ppr_options; u_int offset; @@ -3734,7 +3802,7 @@ ahc_parse_msg(struct ahc_softc *ahc, str } case MSG_EXT_PPR: { - struct ahc_syncrate *syncrate; + const struct ahc_syncrate *syncrate; u_int period; u_int offset; u_int bus_width; @@ -4487,7 +4555,7 @@ ahc_free(struct ahc_softc *ahc) return; } -void +static void ahc_shutdown(void *arg) { struct ahc_softc *ahc; @@ -4891,7 +4959,7 @@ ahc_fini_scbdata(struct ahc_softc *ahc) free(scb_data->scbarray, M_DEVBUF); } -void +static void ahc_alloc_scbs(struct ahc_softc *ahc) { struct scb_data *scb_data; @@ -5623,7 +5691,7 @@ ahc_resume(struct ahc_softc *ahc) * Return the untagged transaction id for a given target/channel lun. * Optionally, clear the entry. */ -u_int +static u_int ahc_index_busy_tcl(struct ahc_softc *ahc, u_int tcl) { u_int scbid; @@ -5644,7 +5712,7 @@ ahc_index_busy_tcl(struct ahc_softc *ahc return (scbid); } -void +static void ahc_unbusy_tcl(struct ahc_softc *ahc, u_int tcl) { u_int target_offset; @@ -5662,7 +5730,7 @@ ahc_unbusy_tcl(struct ahc_softc *ahc, u_ } } -void +static void ahc_busy_tcl(struct ahc_softc *ahc, u_int tcl, u_int scbid) { u_int target_offset; @@ -5717,7 +5785,7 @@ ahc_match_scb(struct ahc_softc *ahc, str return match; } -void +static void ahc_freeze_devq(struct ahc_softc *ahc, struct scb *scb) { int target; @@ -6258,7 +6326,7 @@ ahc_rem_wscb(struct ahc_softc *ahc, u_in * been modified from CAM_REQ_INPROG. This routine assumes that the sequencer * is paused before it is called. */ -int +static int ahc_abort_scbs(struct ahc_softc *ahc, int target, char channel, int lun, u_int tag, role_t role, uint32_t status) { @@ -6580,7 +6648,7 @@ ahc_reset_channel(struct ahc_softc *ahc, /* * Calculate the residual for a just completed SCB. */ -void +static void ahc_calc_residual(struct ahc_softc *ahc, struct scb *scb) { struct hardware_scb *hscb; @@ -7047,7 +7115,7 @@ ahc_download_instr(struct ahc_softc *ahc } int -ahc_print_register(ahc_reg_parse_entry_t *table, u_int num_entries, +ahc_print_register(const ahc_reg_parse_entry_t *table, u_int num_entries, const char *name, u_int address, u_int value, u_int *cur_column, u_int wrap_point) { @@ -7731,7 +7799,7 @@ ahc_update_scsiid(struct ahc_softc *ahc, ahc_outb(ahc, SCSIID, scsiid); } -void +static void ahc_run_tqinfifo(struct ahc_softc *ahc, int paused) { struct target_cmd *cmd; diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_inline.h linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_inline.h --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_inline.h 2007-10-14 15:02:44.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_inline.h 2007-10-14 15:05:07.000000000 +0100 @@ -46,58 +46,13 @@ #define _AIC7XXX_INLINE_H_ /************************* Sequencer Execution Control ************************/ -void ahc_pause_bug_fix(struct ahc_softc *ahc); int ahc_is_paused(struct ahc_softc *ahc); void ahc_pause(struct ahc_softc *ahc); void ahc_unpause(struct ahc_softc *ahc); -/*********************** Untagged Transaction Routines ************************/ -static __inline void ahc_freeze_untagged_queues(struct ahc_softc *ahc); -static __inline void ahc_release_untagged_queues(struct ahc_softc *ahc); - -/* - * Block our completion routine from starting the next untagged - * transaction for this target or target lun. - */ -static __inline void -ahc_freeze_untagged_queues(struct ahc_softc *ahc) -{ - if ((ahc->flags & AHC_SCB_BTT) == 0) - ahc->untagged_queue_lock++; -} - -/* - * Allow the next untagged transaction for this target or target lun - * to be executed. We use a counting semaphore to allow the lock - * to be acquired recursively. Once the count drops to zero, the - * transaction queues will be run. - */ -static __inline void -ahc_release_untagged_queues(struct ahc_softc *ahc) -{ - if ((ahc->flags & AHC_SCB_BTT) == 0) { - ahc->untagged_queue_lock--; - if (ahc->untagged_queue_lock == 0) - ahc_run_untagged_queues(ahc); - } -} - /************************** Memory mapping routines ***************************/ -struct ahc_dma_seg * - ahc_sg_bus_to_virt(struct scb *scb, - uint32_t sg_busaddr); -uint32_t - ahc_sg_virt_to_bus(struct scb *scb, - struct ahc_dma_seg *sg); -uint32_t - ahc_hscb_busaddr(struct ahc_softc *ahc, u_int index); -void ahc_sync_scb(struct ahc_softc *ahc, - struct scb *scb, int op); void ahc_sync_sglist(struct ahc_softc *ahc, struct scb *scb, int op); -uint32_t - ahc_targetcmd_offset(struct ahc_softc *ahc, - u_int index); /******************************** Debugging ***********************************/ static __inline char *ahc_name(struct ahc_softc *ahc); @@ -109,8 +64,6 @@ ahc_name(struct ahc_softc *ahc) } /*********************** Miscelaneous Support Functions ***********************/ -void ahc_update_residual(struct ahc_softc *ahc, - struct scb *scb); struct ahc_initiator_tinfo * ahc_fetch_transinfo(struct ahc_softc *ahc, char channel, u_int our_id, @@ -133,20 +86,12 @@ struct scb* void ahc_free_scb(struct ahc_softc *ahc, struct scb *scb); struct scb * ahc_lookup_scb(struct ahc_softc *ahc, u_int tag); -void ahc_swap_with_next_hscb(struct ahc_softc *ahc, - struct scb *scb); void ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb); struct scsi_sense_data * ahc_get_sense_buf(struct ahc_softc *ahc, struct scb *scb); -uint32_t - ahc_get_sense_bufaddr(struct ahc_softc *ahc, - struct scb *scb); /************************** Interrupt Processing ******************************/ -void ahc_sync_qoutfifo(struct ahc_softc *ahc, int op); -void ahc_sync_tqinfifo(struct ahc_softc *ahc, int op); -u_int ahc_check_cmdcmpltqueues(struct ahc_softc *ahc); int ahc_intr(struct ahc_softc *ahc); #endif /* _AIC7XXX_INLINE_H_ */ diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_osm.c linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_osm.c --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_osm.c 2007-10-14 15:02:44.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_osm.c 2007-10-14 15:05:07.000000000 +0100 @@ -2379,7 +2379,7 @@ static void ahc_linux_set_period(struct unsigned int ppr_options = tinfo->goal.ppr_options; unsigned long flags; unsigned long offset = tinfo->goal.offset; - struct ahc_syncrate *syncrate; + const struct ahc_syncrate *syncrate; if (offset == 0) offset = MAX_OFFSET; @@ -2423,7 +2423,7 @@ static void ahc_linux_set_offset(struct unsigned int ppr_options = 0; unsigned int period = 0; unsigned long flags; - struct ahc_syncrate *syncrate = NULL; + const struct ahc_syncrate *syncrate = NULL; ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, starget->channel + 'A', ROLE_INITIATOR); @@ -2453,7 +2453,7 @@ static void ahc_linux_set_dt(struct scsi unsigned int period = tinfo->goal.period; unsigned int width = tinfo->goal.width; unsigned long flags; - struct ahc_syncrate *syncrate; + const struct ahc_syncrate *syncrate; if (dt && spi_max_width(starget)) { ppr_options |= MSG_EXT_PPR_DT_REQ; diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_osm.h linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_osm.h --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_osm.h 2007-10-14 15:02:44.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_osm.h 2007-10-14 15:05:08.000000000 +0100 @@ -398,9 +398,6 @@ struct info_str { int pos; }; -void ahc_format_transinfo(struct info_str *info, - struct ahc_transinfo *tinfo); - /******************************** Locking *************************************/ /* Lock protecting internal data structures */ diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_proc.c linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_proc.c --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_proc.c 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_proc.c 2007-10-14 15:05:08.000000000 +0100 @@ -137,7 +137,7 @@ copy_info(struct info_str *info, char *f return (len); } -void +static void ahc_format_transinfo(struct info_str *info, struct ahc_transinfo *tinfo) { u_int speed; diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_reg.h_shipped linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_reg.h_shipped --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_reg.h_shipped 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_reg.h_shipped 2007-10-14 15:05:08.000000000 +0100 @@ -12,19 +12,7 @@ typedef struct ahc_reg_parse_entry { uint8_t mask; } ahc_reg_parse_entry_t; -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_scsiseq_print; -#else -#define ahc_scsiseq_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SCSISEQ", 0x00, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_sxfrctl0_print; -#else -#define ahc_sxfrctl0_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SXFRCTL0", 0x01, regvalue, cur_col, wrap) -#endif +#if 0 /* unused */ #if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_sxfrctl1_print; @@ -41,20 +29,6 @@ ahc_reg_print_t ahc_scsisigo_print; #endif #if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_scsisigi_print; -#else -#define ahc_scsisigi_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SCSISIGI", 0x03, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_scsirate_print; -#else -#define ahc_scsirate_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SCSIRATE", 0x04, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_scsiid_print; #else #define ahc_scsiid_print(regvalue, cur_col, wrap) \ @@ -104,13 +78,6 @@ ahc_reg_print_t ahc_clrsint0_print; #endif #if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_sstat0_print; -#else -#define ahc_sstat0_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SSTAT0", 0x0b, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_clrsint1_print; #else #define ahc_clrsint1_print(regvalue, cur_col, wrap) \ @@ -118,27 +85,6 @@ ahc_reg_print_t ahc_clrsint1_print; #endif #if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_sstat1_print; -#else -#define ahc_sstat1_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SSTAT1", 0x0c, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_sstat2_print; -#else -#define ahc_sstat2_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SSTAT2", 0x0d, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_sstat3_print; -#else -#define ahc_sstat3_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SSTAT3", 0x0e, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_scsiid_ultra2_print; #else #define ahc_scsiid_ultra2_print(regvalue, cur_col, wrap) \ @@ -146,27 +92,6 @@ ahc_reg_print_t ahc_scsiid_ultra2_print; #endif #if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_simode0_print; -#else -#define ahc_simode0_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SIMODE0", 0x10, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_simode1_print; -#else -#define ahc_simode1_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SIMODE1", 0x11, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_scsibusl_print; -#else -#define ahc_scsibusl_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SCSIBUSL", 0x12, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_scsibush_print; #else #define ahc_scsibush_print(regvalue, cur_col, wrap) \ @@ -237,13 +162,6 @@ ahc_reg_print_t ahc_seectl_print; #endif #if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_sblkctl_print; -#else -#define ahc_sblkctl_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SBLKCTL", 0x1f, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_busy_targets_print; #else #define ahc_busy_targets_print(regvalue, cur_col, wrap) \ @@ -300,13 +218,6 @@ ahc_reg_print_t ahc_dmaparams_print; #endif #if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_seq_flags_print; -#else -#define ahc_seq_flags_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SEQ_FLAGS", 0x3c, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_saved_scsiid_print; #else #define ahc_saved_scsiid_print(regvalue, cur_col, wrap) \ @@ -321,13 +232,6 @@ ahc_reg_print_t ahc_saved_lun_print; #endif #if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_lastphase_print; -#else -#define ahc_lastphase_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "LASTPHASE", 0x3f, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_waiting_scbh_print; #else #define ahc_waiting_scbh_print(regvalue, cur_col, wrap) \ @@ -475,13 +379,6 @@ ahc_reg_print_t ahc_ha_274_biosctrl_prin #endif #if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_seqctl_print; -#else -#define ahc_seqctl_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SEQCTL", 0x60, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_seqram_print; #else #define ahc_seqram_print(regvalue, cur_col, wrap) \ @@ -685,27 +582,6 @@ ahc_reg_print_t ahc_clrint_print; #endif #if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_error_print; -#else -#define ahc_error_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "ERROR", 0x92, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_dfcntrl_print; -#else -#define ahc_dfcntrl_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "DFCNTRL", 0x93, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_dfstatus_print; -#else -#define ahc_dfstatus_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "DFSTATUS", 0x94, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_dfwaddr_print; #else #define ahc_dfwaddr_print(regvalue, cur_col, wrap) \ @@ -769,13 +645,6 @@ ahc_reg_print_t ahc_qoutcnt_print; #endif #if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_scsiphase_print; -#else -#define ahc_scsiphase_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SCSIPHASE", 0x9e, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_sfunct_print; #else #define ahc_sfunct_print(regvalue, cur_col, wrap) \ @@ -853,34 +722,6 @@ ahc_reg_print_t ahc_scb_sgptr_print; #endif #if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_scb_control_print; -#else -#define ahc_scb_control_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SCB_CONTROL", 0xb8, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_scb_scsiid_print; -#else -#define ahc_scb_scsiid_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SCB_SCSIID", 0xb9, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_scb_lun_print; -#else -#define ahc_scb_lun_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SCB_LUN", 0xba, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS -ahc_reg_print_t ahc_scb_tag_print; -#else -#define ahc_scb_tag_print(regvalue, cur_col, wrap) \ - ahc_print_register(NULL, 0, "SCB_TAG", 0xbb, regvalue, cur_col, wrap) -#endif - -#if AIC_DEBUG_REGISTERS ahc_reg_print_t ahc_scb_cdb_len_print; #else #define ahc_scb_cdb_len_print(regvalue, cur_col, wrap) \ @@ -1062,6 +903,169 @@ ahc_reg_print_t ahc_sg_cache_pre_print; ahc_print_register(NULL, 0, "SG_CACHE_PRE", 0xfc, regvalue, cur_col, wrap) #endif +#endif /* unused */ + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_scsiseq_print; +#else +#define ahc_scsiseq_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SCSISEQ", 0x00, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_sxfrctl0_print; +#else +#define ahc_sxfrctl0_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SXFRCTL0", 0x01, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_scsisigi_print; +#else +#define ahc_scsisigi_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SCSISIGI", 0x03, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_scsirate_print; +#else +#define ahc_scsirate_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SCSIRATE", 0x04, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_sstat0_print; +#else +#define ahc_sstat0_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SSTAT0", 0x0b, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_sstat1_print; +#else +#define ahc_sstat1_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SSTAT1", 0x0c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_sstat2_print; +#else +#define ahc_sstat2_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SSTAT2", 0x0d, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_sstat3_print; +#else +#define ahc_sstat3_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SSTAT3", 0x0e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_simode0_print; +#else +#define ahc_simode0_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SIMODE0", 0x10, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_simode1_print; +#else +#define ahc_simode1_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SIMODE1", 0x11, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_scsibusl_print; +#else +#define ahc_scsibusl_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SCSIBUSL", 0x12, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_sblkctl_print; +#else +#define ahc_sblkctl_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SBLKCTL", 0x1f, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_seq_flags_print; +#else +#define ahc_seq_flags_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SEQ_FLAGS", 0x3c, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_lastphase_print; +#else +#define ahc_lastphase_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "LASTPHASE", 0x3f, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_seqctl_print; +#else +#define ahc_seqctl_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SEQCTL", 0x60, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_error_print; +#else +#define ahc_error_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "ERROR", 0x92, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_dfcntrl_print; +#else +#define ahc_dfcntrl_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "DFCNTRL", 0x93, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_dfstatus_print; +#else +#define ahc_dfstatus_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "DFSTATUS", 0x94, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_scsiphase_print; +#else +#define ahc_scsiphase_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SCSIPHASE", 0x9e, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_scb_control_print; +#else +#define ahc_scb_control_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SCB_CONTROL", 0xb8, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_scb_scsiid_print; +#else +#define ahc_scb_scsiid_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SCB_SCSIID", 0xb9, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_scb_lun_print; +#else +#define ahc_scb_lun_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SCB_LUN", 0xba, regvalue, cur_col, wrap) +#endif + +#if AIC_DEBUG_REGISTERS +ahc_reg_print_t ahc_scb_tag_print; +#else +#define ahc_scb_tag_print(regvalue, cur_col, wrap) \ + ahc_print_register(NULL, 0, "SCB_TAG", 0xbb, regvalue, cur_col, wrap) +#endif + #define SCSISEQ 0x00 #define TEMODE 0x80 diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_reg_print.c_shipped linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_reg_print.c_shipped --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_reg_print.c_shipped 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_reg_print.c_shipped 2007-10-14 15:05:08.000000000 +0100 @@ -8,42 +8,8 @@ #include "aic7xxx_osm.h" -static ahc_reg_parse_entry_t SCSISEQ_parse_table[] = { - { "SCSIRSTO", 0x01, 0x01 }, - { "ENAUTOATNP", 0x02, 0x02 }, - { "ENAUTOATNI", 0x04, 0x04 }, - { "ENAUTOATNO", 0x08, 0x08 }, - { "ENRSELI", 0x10, 0x10 }, - { "ENSELI", 0x20, 0x20 }, - { "ENSELO", 0x40, 0x40 }, - { "TEMODE", 0x80, 0x80 } -}; - -int -ahc_scsiseq_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SCSISEQ_parse_table, 8, "SCSISEQ", - 0x00, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t SXFRCTL0_parse_table[] = { - { "CLRCHN", 0x02, 0x02 }, - { "SCAMEN", 0x04, 0x04 }, - { "SPIOEN", 0x08, 0x08 }, - { "CLRSTCNT", 0x10, 0x10 }, - { "FAST20", 0x20, 0x20 }, - { "DFPEXP", 0x40, 0x40 }, - { "DFON", 0x80, 0x80 } -}; - -int -ahc_sxfrctl0_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SXFRCTL0_parse_table, 7, "SXFRCTL0", - 0x01, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t SXFRCTL1_parse_table[] = { +#if 0 /* unused */ +static const ahc_reg_parse_entry_t SXFRCTL1_parse_table[] = { { "STPWEN", 0x01, 0x01 }, { "ACTNEGEN", 0x02, 0x02 }, { "ENSTIMER", 0x04, 0x04 }, @@ -60,7 +26,7 @@ ahc_sxfrctl1_print(u_int regvalue, u_int 0x02, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SCSISIGO_parse_table[] = { +static const ahc_reg_parse_entry_t SCSISIGO_parse_table[] = { { "ACKO", 0x01, 0x01 }, { "REQO", 0x02, 0x02 }, { "BSYO", 0x04, 0x04 }, @@ -85,50 +51,7 @@ ahc_scsisigo_print(u_int regvalue, u_int 0x03, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SCSISIGI_parse_table[] = { - { "ACKI", 0x01, 0x01 }, - { "REQI", 0x02, 0x02 }, - { "BSYI", 0x04, 0x04 }, - { "SELI", 0x08, 0x08 }, - { "ATNI", 0x10, 0x10 }, - { "MSGI", 0x20, 0x20 }, - { "IOI", 0x40, 0x40 }, - { "CDI", 0x80, 0x80 }, - { "P_DATAOUT", 0x00, 0x00 }, - { "P_DATAOUT_DT", 0x20, 0x20 }, - { "P_DATAIN", 0x40, 0x40 }, - { "P_DATAIN_DT", 0x60, 0x60 }, - { "P_COMMAND", 0x80, 0x80 }, - { "P_MESGOUT", 0xa0, 0xa0 }, - { "P_STATUS", 0xc0, 0xc0 }, - { "PHASE_MASK", 0xe0, 0xe0 }, - { "P_MESGIN", 0xe0, 0xe0 } -}; - -int -ahc_scsisigi_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SCSISIGI_parse_table, 17, "SCSISIGI", - 0x03, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t SCSIRATE_parse_table[] = { - { "SINGLE_EDGE", 0x10, 0x10 }, - { "ENABLE_CRC", 0x40, 0x40 }, - { "WIDEXFER", 0x80, 0x80 }, - { "SXFR_ULTRA2", 0x0f, 0x0f }, - { "SOFS", 0x0f, 0x0f }, - { "SXFR", 0x70, 0x70 } -}; - -int -ahc_scsirate_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SCSIRATE_parse_table, 6, "SCSIRATE", - 0x04, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t SCSIID_parse_table[] = { +static const ahc_reg_parse_entry_t SCSIID_parse_table[] = { { "TWIN_CHNLB", 0x80, 0x80 }, { "OID", 0x0f, 0x0f }, { "TWIN_TID", 0x70, 0x70 }, @@ -164,7 +87,7 @@ ahc_stcnt_print(u_int regvalue, u_int *c 0x08, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t OPTIONMODE_parse_table[] = { +static const ahc_reg_parse_entry_t OPTIONMODE_parse_table[] = { { "DIS_MSGIN_DUALEDGE", 0x01, 0x01 }, { "AUTO_MSGOUT_DE", 0x02, 0x02 }, { "SCSIDATL_IMGEN", 0x04, 0x04 }, @@ -190,7 +113,7 @@ ahc_targcrccnt_print(u_int regvalue, u_i 0x0a, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t CLRSINT0_parse_table[] = { +static const ahc_reg_parse_entry_t CLRSINT0_parse_table[] = { { "CLRSPIORDY", 0x02, 0x02 }, { "CLRSWRAP", 0x08, 0x08 }, { "CLRIOERR", 0x08, 0x08 }, @@ -206,26 +129,7 @@ ahc_clrsint0_print(u_int regvalue, u_int 0x0b, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SSTAT0_parse_table[] = { - { "DMADONE", 0x01, 0x01 }, - { "SPIORDY", 0x02, 0x02 }, - { "SDONE", 0x04, 0x04 }, - { "SWRAP", 0x08, 0x08 }, - { "IOERR", 0x08, 0x08 }, - { "SELINGO", 0x10, 0x10 }, - { "SELDI", 0x20, 0x20 }, - { "SELDO", 0x40, 0x40 }, - { "TARGET", 0x80, 0x80 } -}; - -int -ahc_sstat0_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SSTAT0_parse_table, 9, "SSTAT0", - 0x0b, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t CLRSINT1_parse_table[] = { +static const ahc_reg_parse_entry_t CLRSINT1_parse_table[] = { { "CLRREQINIT", 0x01, 0x01 }, { "CLRPHASECHG", 0x02, 0x02 }, { "CLRSCSIPERR", 0x04, 0x04 }, @@ -242,56 +146,7 @@ ahc_clrsint1_print(u_int regvalue, u_int 0x0c, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SSTAT1_parse_table[] = { - { "REQINIT", 0x01, 0x01 }, - { "PHASECHG", 0x02, 0x02 }, - { "SCSIPERR", 0x04, 0x04 }, - { "BUSFREE", 0x08, 0x08 }, - { "PHASEMIS", 0x10, 0x10 }, - { "SCSIRSTI", 0x20, 0x20 }, - { "ATNTARG", 0x40, 0x40 }, - { "SELTO", 0x80, 0x80 } -}; - -int -ahc_sstat1_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SSTAT1_parse_table, 8, "SSTAT1", - 0x0c, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t SSTAT2_parse_table[] = { - { "DUAL_EDGE_ERR", 0x01, 0x01 }, - { "CRCREQERR", 0x02, 0x02 }, - { "CRCENDERR", 0x04, 0x04 }, - { "CRCVALERR", 0x08, 0x08 }, - { "EXP_ACTIVE", 0x10, 0x10 }, - { "SHVALID", 0x40, 0x40 }, - { "OVERRUN", 0x80, 0x80 }, - { "SFCNT", 0x1f, 0x1f } -}; - -int -ahc_sstat2_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SSTAT2_parse_table, 8, "SSTAT2", - 0x0d, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t SSTAT3_parse_table[] = { - { "OFFCNT", 0x0f, 0x0f }, - { "U2OFFCNT", 0x7f, 0x7f }, - { "SCSICNT", 0xf0, 0xf0 } -}; - -int -ahc_sstat3_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SSTAT3_parse_table, 3, "SSTAT3", - 0x0e, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t SCSIID_ULTRA2_parse_table[] = { +static const ahc_reg_parse_entry_t SCSIID_ULTRA2_parse_table[] = { { "OID", 0x0f, 0x0f }, { "TID", 0xf0, 0xf0 } }; @@ -303,49 +158,6 @@ ahc_scsiid_ultra2_print(u_int regvalue, 0x0f, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SIMODE0_parse_table[] = { - { "ENDMADONE", 0x01, 0x01 }, - { "ENSPIORDY", 0x02, 0x02 }, - { "ENSDONE", 0x04, 0x04 }, - { "ENSWRAP", 0x08, 0x08 }, - { "ENIOERR", 0x08, 0x08 }, - { "ENSELINGO", 0x10, 0x10 }, - { "ENSELDI", 0x20, 0x20 }, - { "ENSELDO", 0x40, 0x40 } -}; - -int -ahc_simode0_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SIMODE0_parse_table, 8, "SIMODE0", - 0x10, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t SIMODE1_parse_table[] = { - { "ENREQINIT", 0x01, 0x01 }, - { "ENPHASECHG", 0x02, 0x02 }, - { "ENSCSIPERR", 0x04, 0x04 }, - { "ENBUSFREE", 0x08, 0x08 }, - { "ENPHASEMIS", 0x10, 0x10 }, - { "ENSCSIRST", 0x20, 0x20 }, - { "ENATNTARG", 0x40, 0x40 }, - { "ENSELTIMO", 0x80, 0x80 } -}; - -int -ahc_simode1_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SIMODE1_parse_table, 8, "SIMODE1", - 0x11, regvalue, cur_col, wrap)); -} - -int -ahc_scsibusl_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(NULL, 0, "SCSIBUSL", - 0x12, regvalue, cur_col, wrap)); -} - int ahc_scsibush_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -353,7 +165,7 @@ ahc_scsibush_print(u_int regvalue, u_int 0x13, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SXFRCTL2_parse_table[] = { +static const ahc_reg_parse_entry_t SXFRCTL2_parse_table[] = { { "CMDDMAEN", 0x08, 0x08 }, { "AUTORSTDIS", 0x10, 0x10 }, { "ASYNC_SETUP", 0x07, 0x07 } @@ -373,7 +185,7 @@ ahc_shaddr_print(u_int regvalue, u_int * 0x14, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SELTIMER_parse_table[] = { +static const ahc_reg_parse_entry_t SELTIMER_parse_table[] = { { "STAGE1", 0x01, 0x01 }, { "STAGE2", 0x02, 0x02 }, { "STAGE3", 0x04, 0x04 }, @@ -389,7 +201,7 @@ ahc_seltimer_print(u_int regvalue, u_int 0x18, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SELID_parse_table[] = { +static const ahc_reg_parse_entry_t SELID_parse_table[] = { { "ONEBIT", 0x08, 0x08 }, { "SELID_MASK", 0xf0, 0xf0 } }; @@ -401,7 +213,7 @@ ahc_selid_print(u_int regvalue, u_int *c 0x19, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SCAMCTL_parse_table[] = { +static const ahc_reg_parse_entry_t SCAMCTL_parse_table[] = { { "DFLTTID", 0x10, 0x10 }, { "ALTSTIM", 0x20, 0x20 }, { "CLRSCAMSELID", 0x40, 0x40 }, @@ -423,7 +235,7 @@ ahc_targid_print(u_int regvalue, u_int * 0x1b, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SPIOCAP_parse_table[] = { +static const ahc_reg_parse_entry_t SPIOCAP_parse_table[] = { { "SSPIOCPS", 0x01, 0x01 }, { "ROM", 0x02, 0x02 }, { "EEPROM", 0x04, 0x04 }, @@ -441,7 +253,7 @@ ahc_spiocap_print(u_int regvalue, u_int 0x1b, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t BRDCTL_parse_table[] = { +static const ahc_reg_parse_entry_t BRDCTL_parse_table[] = { { "BRDCTL0", 0x01, 0x01 }, { "BRDSTB_ULTRA2", 0x01, 0x01 }, { "BRDCTL1", 0x02, 0x02 }, @@ -464,7 +276,7 @@ ahc_brdctl_print(u_int regvalue, u_int * 0x1d, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SEECTL_parse_table[] = { +static const ahc_reg_parse_entry_t SEECTL_parse_table[] = { { "SEEDI", 0x01, 0x01 }, { "SEEDO", 0x02, 0x02 }, { "SEECK", 0x04, 0x04 }, @@ -482,24 +294,6 @@ ahc_seectl_print(u_int regvalue, u_int * 0x1e, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SBLKCTL_parse_table[] = { - { "XCVR", 0x01, 0x01 }, - { "SELWIDE", 0x02, 0x02 }, - { "ENAB20", 0x04, 0x04 }, - { "SELBUSB", 0x08, 0x08 }, - { "ENAB40", 0x08, 0x08 }, - { "AUTOFLUSHDIS", 0x20, 0x20 }, - { "DIAGLEDON", 0x40, 0x40 }, - { "DIAGLEDEN", 0x80, 0x80 } -}; - -int -ahc_sblkctl_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SBLKCTL_parse_table, 8, "SBLKCTL", - 0x1f, regvalue, cur_col, wrap)); -} - int ahc_busy_targets_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -549,7 +343,7 @@ ahc_msg_out_print(u_int regvalue, u_int 0x3a, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t DMAPARAMS_parse_table[] = { +static const ahc_reg_parse_entry_t DMAPARAMS_parse_table[] = { { "FIFORESET", 0x01, 0x01 }, { "FIFOFLUSH", 0x02, 0x02 }, { "DIRECTION", 0x04, 0x04 }, @@ -569,25 +363,6 @@ ahc_dmaparams_print(u_int regvalue, u_in 0x3b, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SEQ_FLAGS_parse_table[] = { - { "NO_DISCONNECT", 0x01, 0x01 }, - { "SPHASE_PENDING", 0x02, 0x02 }, - { "DPHASE_PENDING", 0x04, 0x04 }, - { "CMDPHASE_PENDING", 0x08, 0x08 }, - { "TARG_CMD_PENDING", 0x10, 0x10 }, - { "DPHASE", 0x20, 0x20 }, - { "NO_CDB_SENT", 0x40, 0x40 }, - { "TARGET_CMD_IS_TAGGED",0x40, 0x40 }, - { "NOT_IDENTIFIED", 0x80, 0x80 } -}; - -int -ahc_seq_flags_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SEQ_FLAGS_parse_table, 9, "SEQ_FLAGS", - 0x3c, regvalue, cur_col, wrap)); -} - int ahc_saved_scsiid_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -602,27 +377,6 @@ ahc_saved_lun_print(u_int regvalue, u_in 0x3e, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t LASTPHASE_parse_table[] = { - { "MSGI", 0x20, 0x20 }, - { "IOI", 0x40, 0x40 }, - { "CDI", 0x80, 0x80 }, - { "P_DATAOUT", 0x00, 0x00 }, - { "P_BUSFREE", 0x01, 0x01 }, - { "P_DATAIN", 0x40, 0x40 }, - { "P_COMMAND", 0x80, 0x80 }, - { "P_MESGOUT", 0xa0, 0xa0 }, - { "P_STATUS", 0xc0, 0xc0 }, - { "PHASE_MASK", 0xe0, 0xe0 }, - { "P_MESGIN", 0xe0, 0xe0 } -}; - -int -ahc_lastphase_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(LASTPHASE_parse_table, 11, "LASTPHASE", - 0x3f, regvalue, cur_col, wrap)); -} - int ahc_waiting_scbh_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -700,7 +454,7 @@ ahc_tqinpos_print(u_int regvalue, u_int 0x50, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t ARG_1_parse_table[] = { +static const ahc_reg_parse_entry_t ARG_1_parse_table[] = { { "CONT_TARG_SESSION", 0x02, 0x02 }, { "CONT_MSG_LOOP", 0x04, 0x04 }, { "EXIT_MSG_LOOP", 0x08, 0x08 }, @@ -731,7 +485,7 @@ ahc_last_msg_print(u_int regvalue, u_int 0x53, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SCSISEQ_TEMPLATE_parse_table[] = { +static const ahc_reg_parse_entry_t SCSISEQ_TEMPLATE_parse_table[] = { { "ENAUTOATNP", 0x02, 0x02 }, { "ENAUTOATNI", 0x04, 0x04 }, { "ENAUTOATNO", 0x08, 0x08 }, @@ -747,7 +501,7 @@ ahc_scsiseq_template_print(u_int regvalu 0x54, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t HA_274_BIOSGLOBAL_parse_table[] = { +static const ahc_reg_parse_entry_t HA_274_BIOSGLOBAL_parse_table[] = { { "HA_274_EXTENDED_TRANS",0x01, 0x01 } }; @@ -758,7 +512,7 @@ ahc_ha_274_biosglobal_print(u_int regval 0x56, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SEQ_FLAGS2_parse_table[] = { +static const ahc_reg_parse_entry_t SEQ_FLAGS2_parse_table[] = { { "SCB_DMA", 0x01, 0x01 }, { "TARGET_MSG_PENDING", 0x02, 0x02 } }; @@ -770,7 +524,7 @@ ahc_seq_flags2_print(u_int regvalue, u_i 0x57, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SCSICONF_parse_table[] = { +static const ahc_reg_parse_entry_t SCSICONF_parse_table[] = { { "ENSPCHK", 0x20, 0x20 }, { "RESET_SCSI", 0x40, 0x40 }, { "TERM_ENB", 0x80, 0x80 }, @@ -785,7 +539,7 @@ ahc_scsiconf_print(u_int regvalue, u_int 0x5a, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t INTDEF_parse_table[] = { +static const ahc_reg_parse_entry_t INTDEF_parse_table[] = { { "EDGE_TRIG", 0x80, 0x80 }, { "VECTOR", 0x0f, 0x0f } }; @@ -804,7 +558,7 @@ ahc_hostconf_print(u_int regvalue, u_int 0x5d, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t HA_274_BIOSCTRL_parse_table[] = { +static const ahc_reg_parse_entry_t HA_274_BIOSCTRL_parse_table[] = { { "CHANNEL_B_PRIMARY", 0x08, 0x08 }, { "BIOSMODE", 0x30, 0x30 }, { "BIOSDISABLED", 0x30, 0x30 } @@ -817,24 +571,6 @@ ahc_ha_274_biosctrl_print(u_int regvalue 0x5f, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SEQCTL_parse_table[] = { - { "LOADRAM", 0x01, 0x01 }, - { "SEQRESET", 0x02, 0x02 }, - { "STEP", 0x04, 0x04 }, - { "BRKADRINTEN", 0x08, 0x08 }, - { "FASTMODE", 0x10, 0x10 }, - { "FAILDIS", 0x20, 0x20 }, - { "PAUSEDIS", 0x40, 0x40 }, - { "PERRORDIS", 0x80, 0x80 } -}; - -int -ahc_seqctl_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SEQCTL_parse_table, 8, "SEQCTL", - 0x60, regvalue, cur_col, wrap)); -} - int ahc_seqram_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -849,7 +585,7 @@ ahc_seqaddr0_print(u_int regvalue, u_int 0x62, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SEQADDR1_parse_table[] = { +static const ahc_reg_parse_entry_t SEQADDR1_parse_table[] = { { "SEQADDR1_MASK", 0x01, 0x01 } }; @@ -902,7 +638,7 @@ ahc_none_print(u_int regvalue, u_int *cu 0x6a, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t FLAGS_parse_table[] = { +static const ahc_reg_parse_entry_t FLAGS_parse_table[] = { { "CARRY", 0x01, 0x01 }, { "ZERO", 0x02, 0x02 } }; @@ -956,7 +692,7 @@ ahc_sram_base_print(u_int regvalue, u_in 0x70, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t BCTL_parse_table[] = { +static const ahc_reg_parse_entry_t BCTL_parse_table[] = { { "ENABLE", 0x01, 0x01 }, { "ACE", 0x08, 0x08 } }; @@ -968,7 +704,7 @@ ahc_bctl_print(u_int regvalue, u_int *cu 0x84, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t DSCOMMAND0_parse_table[] = { +static const ahc_reg_parse_entry_t DSCOMMAND0_parse_table[] = { { "CIOPARCKEN", 0x01, 0x01 }, { "USCBSIZE32", 0x02, 0x02 }, { "RAMPS", 0x04, 0x04 }, @@ -986,7 +722,7 @@ ahc_dscommand0_print(u_int regvalue, u_i 0x84, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t BUSTIME_parse_table[] = { +static const ahc_reg_parse_entry_t BUSTIME_parse_table[] = { { "BON", 0x0f, 0x0f }, { "BOFF", 0xf0, 0xf0 } }; @@ -998,7 +734,7 @@ ahc_bustime_print(u_int regvalue, u_int 0x85, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t DSCOMMAND1_parse_table[] = { +static const ahc_reg_parse_entry_t DSCOMMAND1_parse_table[] = { { "HADDLDSEL0", 0x01, 0x01 }, { "HADDLDSEL1", 0x02, 0x02 }, { "DSLATT", 0xfc, 0xfc } @@ -1011,7 +747,7 @@ ahc_dscommand1_print(u_int regvalue, u_i 0x85, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t BUSSPD_parse_table[] = { +static const ahc_reg_parse_entry_t BUSSPD_parse_table[] = { { "STBON", 0x07, 0x07 }, { "STBOFF", 0x38, 0x38 }, { "DFTHRSH_75", 0x80, 0x80 }, @@ -1026,7 +762,7 @@ ahc_busspd_print(u_int regvalue, u_int * 0x86, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t HS_MAILBOX_parse_table[] = { +static const ahc_reg_parse_entry_t HS_MAILBOX_parse_table[] = { { "SEQ_MAILBOX", 0x0f, 0x0f }, { "HOST_TQINPOS", 0x80, 0x80 }, { "HOST_MAILBOX", 0xf0, 0xf0 } @@ -1039,7 +775,7 @@ ahc_hs_mailbox_print(u_int regvalue, u_i 0x86, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t DSPCISTATUS_parse_table[] = { +static const ahc_reg_parse_entry_t DSPCISTATUS_parse_table[] = { { "DFTHRSH_100", 0xc0, 0xc0 } }; @@ -1050,7 +786,7 @@ ahc_dspcistatus_print(u_int regvalue, u_ 0x86, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t HCNTRL_parse_table[] = { +static const ahc_reg_parse_entry_t HCNTRL_parse_table[] = { { "CHIPRST", 0x01, 0x01 }, { "CHIPRSTACK", 0x01, 0x01 }, { "INTEN", 0x02, 0x02 }, @@ -1088,7 +824,7 @@ ahc_scbptr_print(u_int regvalue, u_int * 0x90, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t INTSTAT_parse_table[] = { +static const ahc_reg_parse_entry_t INTSTAT_parse_table[] = { { "SEQINT", 0x01, 0x01 }, { "CMDCMPLT", 0x02, 0x02 }, { "SCSIINT", 0x04, 0x04 }, @@ -1119,7 +855,7 @@ ahc_intstat_print(u_int regvalue, u_int 0x91, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t CLRINT_parse_table[] = { +static const ahc_reg_parse_entry_t CLRINT_parse_table[] = { { "CLRSEQINT", 0x01, 0x01 }, { "CLRCMDINT", 0x02, 0x02 }, { "CLRSCSIINT", 0x04, 0x04 }, @@ -1134,62 +870,6 @@ ahc_clrint_print(u_int regvalue, u_int * 0x92, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t ERROR_parse_table[] = { - { "ILLHADDR", 0x01, 0x01 }, - { "ILLSADDR", 0x02, 0x02 }, - { "ILLOPCODE", 0x04, 0x04 }, - { "SQPARERR", 0x08, 0x08 }, - { "DPARERR", 0x10, 0x10 }, - { "MPARERR", 0x20, 0x20 }, - { "PCIERRSTAT", 0x40, 0x40 }, - { "CIOPARERR", 0x80, 0x80 } -}; - -int -ahc_error_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(ERROR_parse_table, 8, "ERROR", - 0x92, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t DFCNTRL_parse_table[] = { - { "FIFORESET", 0x01, 0x01 }, - { "FIFOFLUSH", 0x02, 0x02 }, - { "DIRECTION", 0x04, 0x04 }, - { "HDMAEN", 0x08, 0x08 }, - { "HDMAENACK", 0x08, 0x08 }, - { "SDMAEN", 0x10, 0x10 }, - { "SDMAENACK", 0x10, 0x10 }, - { "SCSIEN", 0x20, 0x20 }, - { "WIDEODD", 0x40, 0x40 }, - { "PRELOADEN", 0x80, 0x80 } -}; - -int -ahc_dfcntrl_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(DFCNTRL_parse_table, 10, "DFCNTRL", - 0x93, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t DFSTATUS_parse_table[] = { - { "FIFOEMP", 0x01, 0x01 }, - { "FIFOFULL", 0x02, 0x02 }, - { "DFTHRESH", 0x04, 0x04 }, - { "HDONE", 0x08, 0x08 }, - { "MREQPEND", 0x10, 0x10 }, - { "FIFOQWDEMP", 0x20, 0x20 }, - { "DFCACHETH", 0x40, 0x40 }, - { "PRELOAD_AVAIL", 0x80, 0x80 } -}; - -int -ahc_dfstatus_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(DFSTATUS_parse_table, 8, "DFSTATUS", - 0x94, regvalue, cur_col, wrap)); -} - int ahc_dfwaddr_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -1211,7 +891,7 @@ ahc_dfdat_print(u_int regvalue, u_int *c 0x99, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SCBCNT_parse_table[] = { +static const ahc_reg_parse_entry_t SCBCNT_parse_table[] = { { "SCBAUTO", 0x80, 0x80 }, { "SCBCNT_MASK", 0x1f, 0x1f } }; @@ -1244,7 +924,7 @@ ahc_qoutfifo_print(u_int regvalue, u_int 0x9d, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t CRCCONTROL1_parse_table[] = { +static const ahc_reg_parse_entry_t CRCCONTROL1_parse_table[] = { { "TARGCRCCNTEN", 0x04, 0x04 }, { "TARGCRCENDEN", 0x08, 0x08 }, { "CRCREQCHKEN", 0x10, 0x10 }, @@ -1267,24 +947,7 @@ ahc_qoutcnt_print(u_int regvalue, u_int 0x9e, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SCSIPHASE_parse_table[] = { - { "DATA_OUT_PHASE", 0x01, 0x01 }, - { "DATA_IN_PHASE", 0x02, 0x02 }, - { "MSG_OUT_PHASE", 0x04, 0x04 }, - { "MSG_IN_PHASE", 0x08, 0x08 }, - { "COMMAND_PHASE", 0x10, 0x10 }, - { "STATUS_PHASE", 0x20, 0x20 }, - { "DATA_PHASE_MASK", 0x03, 0x03 } -}; - -int -ahc_scsiphase_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SCSIPHASE_parse_table, 7, "SCSIPHASE", - 0x9e, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t SFUNCT_parse_table[] = { +static const ahc_reg_parse_entry_t SFUNCT_parse_table[] = { { "ALT_MODE", 0x80, 0x80 } }; @@ -1351,7 +1014,7 @@ ahc_scb_dataptr_print(u_int regvalue, u_ 0xac, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SCB_DATACNT_parse_table[] = { +static const ahc_reg_parse_entry_t SCB_DATACNT_parse_table[] = { { "SG_LAST_SEG", 0x80, 0x80 }, { "SG_HIGH_ADDR_BITS", 0x7f, 0x7f } }; @@ -1363,7 +1026,7 @@ ahc_scb_datacnt_print(u_int regvalue, u_ 0xb0, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SCB_SGPTR_parse_table[] = { +static const ahc_reg_parse_entry_t SCB_SGPTR_parse_table[] = { { "SG_LIST_NULL", 0x01, 0x01 }, { "SG_FULL_RESID", 0x02, 0x02 }, { "SG_RESID_VALID", 0x04, 0x04 } @@ -1376,57 +1039,6 @@ ahc_scb_sgptr_print(u_int regvalue, u_in 0xb4, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SCB_CONTROL_parse_table[] = { - { "DISCONNECTED", 0x04, 0x04 }, - { "ULTRAENB", 0x08, 0x08 }, - { "MK_MESSAGE", 0x10, 0x10 }, - { "TAG_ENB", 0x20, 0x20 }, - { "DISCENB", 0x40, 0x40 }, - { "TARGET_SCB", 0x80, 0x80 }, - { "STATUS_RCVD", 0x80, 0x80 }, - { "SCB_TAG_TYPE", 0x03, 0x03 } -}; - -int -ahc_scb_control_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SCB_CONTROL_parse_table, 8, "SCB_CONTROL", - 0xb8, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t SCB_SCSIID_parse_table[] = { - { "TWIN_CHNLB", 0x80, 0x80 }, - { "OID", 0x0f, 0x0f }, - { "TWIN_TID", 0x70, 0x70 }, - { "TID", 0xf0, 0xf0 } -}; - -int -ahc_scb_scsiid_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SCB_SCSIID_parse_table, 4, "SCB_SCSIID", - 0xb9, regvalue, cur_col, wrap)); -} - -static ahc_reg_parse_entry_t SCB_LUN_parse_table[] = { - { "SCB_XFERLEN_ODD", 0x80, 0x80 }, - { "LID", 0x3f, 0x3f } -}; - -int -ahc_scb_lun_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(SCB_LUN_parse_table, 2, "SCB_LUN", - 0xba, regvalue, cur_col, wrap)); -} - -int -ahc_scb_tag_print(u_int regvalue, u_int *cur_col, u_int wrap) -{ - return (ahc_print_register(NULL, 0, "SCB_TAG", - 0xbb, regvalue, cur_col, wrap)); -} - int ahc_scb_cdb_len_print(u_int regvalue, u_int *cur_col, u_int wrap) { @@ -1462,7 +1074,7 @@ ahc_scb_64_spare_print(u_int regvalue, u 0xc0, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SEECTL_2840_parse_table[] = { +static const ahc_reg_parse_entry_t SEECTL_2840_parse_table[] = { { "DO_2840", 0x01, 0x01 }, { "CK_2840", 0x02, 0x02 }, { "CS_2840", 0x04, 0x04 } @@ -1475,7 +1087,7 @@ ahc_seectl_2840_print(u_int regvalue, u_ 0xc0, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t STATUS_2840_parse_table[] = { +static const ahc_reg_parse_entry_t STATUS_2840_parse_table[] = { { "DI_2840", 0x01, 0x01 }, { "EEPROM_TF", 0x80, 0x80 }, { "ADSEL", 0x1e, 0x1e }, @@ -1524,7 +1136,7 @@ ahc_ccsgaddr_print(u_int regvalue, u_int 0xea, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t CCSGCTL_parse_table[] = { +static const ahc_reg_parse_entry_t CCSGCTL_parse_table[] = { { "CCSGRESET", 0x01, 0x01 }, { "SG_FETCH_NEEDED", 0x02, 0x02 }, { "CCSGEN", 0x08, 0x08 }, @@ -1552,7 +1164,7 @@ ahc_ccscbaddr_print(u_int regvalue, u_in 0xed, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t CCSCBCTL_parse_table[] = { +static const ahc_reg_parse_entry_t CCSCBCTL_parse_table[] = { { "CCSCBRESET", 0x01, 0x01 }, { "CCSCBDIR", 0x04, 0x04 }, { "CCSCBEN", 0x08, 0x08 }, @@ -1610,7 +1222,7 @@ ahc_sdscb_qoff_print(u_int regvalue, u_i 0xf8, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t QOFF_CTLSTA_parse_table[] = { +static const ahc_reg_parse_entry_t QOFF_CTLSTA_parse_table[] = { { "SDSCB_ROLLOVER", 0x10, 0x10 }, { "SNSCB_ROLLOVER", 0x20, 0x20 }, { "SCB_AVAIL", 0x40, 0x40 }, @@ -1625,7 +1237,7 @@ ahc_qoff_ctlsta_print(u_int regvalue, u_ 0xfa, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t DFF_THRSH_parse_table[] = { +static const ahc_reg_parse_entry_t DFF_THRSH_parse_table[] = { { "RD_DFTHRSH_MIN", 0x00, 0x00 }, { "WR_DFTHRSH_MIN", 0x00, 0x00 }, { "RD_DFTHRSH_25", 0x01, 0x01 }, @@ -1653,7 +1265,7 @@ ahc_dff_thrsh_print(u_int regvalue, u_in 0xfb, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SG_CACHE_SHADOW_parse_table[] = { +static const ahc_reg_parse_entry_t SG_CACHE_SHADOW_parse_table[] = { { "LAST_SEG_DONE", 0x01, 0x01 }, { "LAST_SEG", 0x02, 0x02 }, { "SG_ADDR_MASK", 0xf8, 0xf8 } @@ -1666,7 +1278,7 @@ ahc_sg_cache_shadow_print(u_int regvalue 0xfc, regvalue, cur_col, wrap)); } -static ahc_reg_parse_entry_t SG_CACHE_PRE_parse_table[] = { +static const ahc_reg_parse_entry_t SG_CACHE_PRE_parse_table[] = { { "LAST_SEG_DONE", 0x01, 0x01 }, { "LAST_SEG", 0x02, 0x02 }, { "SG_ADDR_MASK", 0xf8, 0xf8 } @@ -1678,4 +1290,395 @@ ahc_sg_cache_pre_print(u_int regvalue, u return (ahc_print_register(SG_CACHE_PRE_parse_table, 3, "SG_CACHE_PRE", 0xfc, regvalue, cur_col, wrap)); } +#endif /* unused */ + + +static const ahc_reg_parse_entry_t SCSISEQ_parse_table[] = { + { "SCSIRSTO", 0x01, 0x01 }, + { "ENAUTOATNP", 0x02, 0x02 }, + { "ENAUTOATNI", 0x04, 0x04 }, + { "ENAUTOATNO", 0x08, 0x08 }, + { "ENRSELI", 0x10, 0x10 }, + { "ENSELI", 0x20, 0x20 }, + { "ENSELO", 0x40, 0x40 }, + { "TEMODE", 0x80, 0x80 } +}; + +int +ahc_scsiseq_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SCSISEQ_parse_table, 8, "SCSISEQ", + 0x00, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SXFRCTL0_parse_table[] = { + { "CLRCHN", 0x02, 0x02 }, + { "SCAMEN", 0x04, 0x04 }, + { "SPIOEN", 0x08, 0x08 }, + { "CLRSTCNT", 0x10, 0x10 }, + { "FAST20", 0x20, 0x20 }, + { "DFPEXP", 0x40, 0x40 }, + { "DFON", 0x80, 0x80 } +}; + +int +ahc_sxfrctl0_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SXFRCTL0_parse_table, 7, "SXFRCTL0", + 0x01, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SCSISIGI_parse_table[] = { + { "ACKI", 0x01, 0x01 }, + { "REQI", 0x02, 0x02 }, + { "BSYI", 0x04, 0x04 }, + { "SELI", 0x08, 0x08 }, + { "ATNI", 0x10, 0x10 }, + { "MSGI", 0x20, 0x20 }, + { "IOI", 0x40, 0x40 }, + { "CDI", 0x80, 0x80 }, + { "P_DATAOUT", 0x00, 0x00 }, + { "P_DATAOUT_DT", 0x20, 0x20 }, + { "P_DATAIN", 0x40, 0x40 }, + { "P_DATAIN_DT", 0x60, 0x60 }, + { "P_COMMAND", 0x80, 0x80 }, + { "P_MESGOUT", 0xa0, 0xa0 }, + { "P_STATUS", 0xc0, 0xc0 }, + { "PHASE_MASK", 0xe0, 0xe0 }, + { "P_MESGIN", 0xe0, 0xe0 } +}; + +int +ahc_scsisigi_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SCSISIGI_parse_table, 17, "SCSISIGI", + 0x03, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SCSIRATE_parse_table[] = { + { "SINGLE_EDGE", 0x10, 0x10 }, + { "ENABLE_CRC", 0x40, 0x40 }, + { "WIDEXFER", 0x80, 0x80 }, + { "SXFR_ULTRA2", 0x0f, 0x0f }, + { "SOFS", 0x0f, 0x0f }, + { "SXFR", 0x70, 0x70 } +}; + +int +ahc_scsirate_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SCSIRATE_parse_table, 6, "SCSIRATE", + 0x04, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SSTAT0_parse_table[] = { + { "DMADONE", 0x01, 0x01 }, + { "SPIORDY", 0x02, 0x02 }, + { "SDONE", 0x04, 0x04 }, + { "SWRAP", 0x08, 0x08 }, + { "IOERR", 0x08, 0x08 }, + { "SELINGO", 0x10, 0x10 }, + { "SELDI", 0x20, 0x20 }, + { "SELDO", 0x40, 0x40 }, + { "TARGET", 0x80, 0x80 } +}; + +int +ahc_sstat0_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SSTAT0_parse_table, 9, "SSTAT0", + 0x0b, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SSTAT1_parse_table[] = { + { "REQINIT", 0x01, 0x01 }, + { "PHASECHG", 0x02, 0x02 }, + { "SCSIPERR", 0x04, 0x04 }, + { "BUSFREE", 0x08, 0x08 }, + { "PHASEMIS", 0x10, 0x10 }, + { "SCSIRSTI", 0x20, 0x20 }, + { "ATNTARG", 0x40, 0x40 }, + { "SELTO", 0x80, 0x80 } +}; + +int +ahc_sstat1_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SSTAT1_parse_table, 8, "SSTAT1", + 0x0c, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SSTAT2_parse_table[] = { + { "DUAL_EDGE_ERR", 0x01, 0x01 }, + { "CRCREQERR", 0x02, 0x02 }, + { "CRCENDERR", 0x04, 0x04 }, + { "CRCVALERR", 0x08, 0x08 }, + { "EXP_ACTIVE", 0x10, 0x10 }, + { "SHVALID", 0x40, 0x40 }, + { "OVERRUN", 0x80, 0x80 }, + { "SFCNT", 0x1f, 0x1f } +}; + +int +ahc_sstat2_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SSTAT2_parse_table, 8, "SSTAT2", + 0x0d, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SSTAT3_parse_table[] = { + { "OFFCNT", 0x0f, 0x0f }, + { "U2OFFCNT", 0x7f, 0x7f }, + { "SCSICNT", 0xf0, 0xf0 } +}; + +int +ahc_sstat3_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SSTAT3_parse_table, 3, "SSTAT3", + 0x0e, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SIMODE0_parse_table[] = { + { "ENDMADONE", 0x01, 0x01 }, + { "ENSPIORDY", 0x02, 0x02 }, + { "ENSDONE", 0x04, 0x04 }, + { "ENSWRAP", 0x08, 0x08 }, + { "ENIOERR", 0x08, 0x08 }, + { "ENSELINGO", 0x10, 0x10 }, + { "ENSELDI", 0x20, 0x20 }, + { "ENSELDO", 0x40, 0x40 } +}; + +int +ahc_simode0_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SIMODE0_parse_table, 8, "SIMODE0", + 0x10, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SIMODE1_parse_table[] = { + { "ENREQINIT", 0x01, 0x01 }, + { "ENPHASECHG", 0x02, 0x02 }, + { "ENSCSIPERR", 0x04, 0x04 }, + { "ENBUSFREE", 0x08, 0x08 }, + { "ENPHASEMIS", 0x10, 0x10 }, + { "ENSCSIRST", 0x20, 0x20 }, + { "ENATNTARG", 0x40, 0x40 }, + { "ENSELTIMO", 0x80, 0x80 } +}; + +int +ahc_simode1_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SIMODE1_parse_table, 8, "SIMODE1", + 0x11, regvalue, cur_col, wrap)); +} + +int +ahc_scsibusl_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(NULL, 0, "SCSIBUSL", + 0x12, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SBLKCTL_parse_table[] = { + { "XCVR", 0x01, 0x01 }, + { "SELWIDE", 0x02, 0x02 }, + { "ENAB20", 0x04, 0x04 }, + { "SELBUSB", 0x08, 0x08 }, + { "ENAB40", 0x08, 0x08 }, + { "AUTOFLUSHDIS", 0x20, 0x20 }, + { "DIAGLEDON", 0x40, 0x40 }, + { "DIAGLEDEN", 0x80, 0x80 } +}; + +int +ahc_sblkctl_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SBLKCTL_parse_table, 8, "SBLKCTL", + 0x1f, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SEQ_FLAGS_parse_table[] = { + { "NO_DISCONNECT", 0x01, 0x01 }, + { "SPHASE_PENDING", 0x02, 0x02 }, + { "DPHASE_PENDING", 0x04, 0x04 }, + { "CMDPHASE_PENDING", 0x08, 0x08 }, + { "TARG_CMD_PENDING", 0x10, 0x10 }, + { "DPHASE", 0x20, 0x20 }, + { "NO_CDB_SENT", 0x40, 0x40 }, + { "TARGET_CMD_IS_TAGGED",0x40, 0x40 }, + { "NOT_IDENTIFIED", 0x80, 0x80 } +}; + +int +ahc_seq_flags_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SEQ_FLAGS_parse_table, 9, "SEQ_FLAGS", + 0x3c, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t LASTPHASE_parse_table[] = { + { "MSGI", 0x20, 0x20 }, + { "IOI", 0x40, 0x40 }, + { "CDI", 0x80, 0x80 }, + { "P_DATAOUT", 0x00, 0x00 }, + { "P_BUSFREE", 0x01, 0x01 }, + { "P_DATAIN", 0x40, 0x40 }, + { "P_COMMAND", 0x80, 0x80 }, + { "P_MESGOUT", 0xa0, 0xa0 }, + { "P_STATUS", 0xc0, 0xc0 }, + { "PHASE_MASK", 0xe0, 0xe0 }, + { "P_MESGIN", 0xe0, 0xe0 } +}; + +int +ahc_lastphase_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(LASTPHASE_parse_table, 11, "LASTPHASE", + 0x3f, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SEQCTL_parse_table[] = { + { "LOADRAM", 0x01, 0x01 }, + { "SEQRESET", 0x02, 0x02 }, + { "STEP", 0x04, 0x04 }, + { "BRKADRINTEN", 0x08, 0x08 }, + { "FASTMODE", 0x10, 0x10 }, + { "FAILDIS", 0x20, 0x20 }, + { "PAUSEDIS", 0x40, 0x40 }, + { "PERRORDIS", 0x80, 0x80 } +}; + +int +ahc_seqctl_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SEQCTL_parse_table, 8, "SEQCTL", + 0x60, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t ERROR_parse_table[] = { + { "ILLHADDR", 0x01, 0x01 }, + { "ILLSADDR", 0x02, 0x02 }, + { "ILLOPCODE", 0x04, 0x04 }, + { "SQPARERR", 0x08, 0x08 }, + { "DPARERR", 0x10, 0x10 }, + { "MPARERR", 0x20, 0x20 }, + { "PCIERRSTAT", 0x40, 0x40 }, + { "CIOPARERR", 0x80, 0x80 } +}; + +int +ahc_error_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(ERROR_parse_table, 8, "ERROR", + 0x92, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t DFCNTRL_parse_table[] = { + { "FIFORESET", 0x01, 0x01 }, + { "FIFOFLUSH", 0x02, 0x02 }, + { "DIRECTION", 0x04, 0x04 }, + { "HDMAEN", 0x08, 0x08 }, + { "HDMAENACK", 0x08, 0x08 }, + { "SDMAEN", 0x10, 0x10 }, + { "SDMAENACK", 0x10, 0x10 }, + { "SCSIEN", 0x20, 0x20 }, + { "WIDEODD", 0x40, 0x40 }, + { "PRELOADEN", 0x80, 0x80 } +}; + +int +ahc_dfcntrl_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(DFCNTRL_parse_table, 10, "DFCNTRL", + 0x93, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t DFSTATUS_parse_table[] = { + { "FIFOEMP", 0x01, 0x01 }, + { "FIFOFULL", 0x02, 0x02 }, + { "DFTHRESH", 0x04, 0x04 }, + { "HDONE", 0x08, 0x08 }, + { "MREQPEND", 0x10, 0x10 }, + { "FIFOQWDEMP", 0x20, 0x20 }, + { "DFCACHETH", 0x40, 0x40 }, + { "PRELOAD_AVAIL", 0x80, 0x80 } +}; + +int +ahc_dfstatus_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(DFSTATUS_parse_table, 8, "DFSTATUS", + 0x94, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SCSIPHASE_parse_table[] = { + { "DATA_OUT_PHASE", 0x01, 0x01 }, + { "DATA_IN_PHASE", 0x02, 0x02 }, + { "MSG_OUT_PHASE", 0x04, 0x04 }, + { "MSG_IN_PHASE", 0x08, 0x08 }, + { "COMMAND_PHASE", 0x10, 0x10 }, + { "STATUS_PHASE", 0x20, 0x20 }, + { "DATA_PHASE_MASK", 0x03, 0x03 } +}; + +int +ahc_scsiphase_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SCSIPHASE_parse_table, 7, "SCSIPHASE", + 0x9e, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SCB_CONTROL_parse_table[] = { + { "DISCONNECTED", 0x04, 0x04 }, + { "ULTRAENB", 0x08, 0x08 }, + { "MK_MESSAGE", 0x10, 0x10 }, + { "TAG_ENB", 0x20, 0x20 }, + { "DISCENB", 0x40, 0x40 }, + { "TARGET_SCB", 0x80, 0x80 }, + { "STATUS_RCVD", 0x80, 0x80 }, + { "SCB_TAG_TYPE", 0x03, 0x03 } +}; + +int +ahc_scb_control_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SCB_CONTROL_parse_table, 8, "SCB_CONTROL", + 0xb8, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SCB_SCSIID_parse_table[] = { + { "TWIN_CHNLB", 0x80, 0x80 }, + { "OID", 0x0f, 0x0f }, + { "TWIN_TID", 0x70, 0x70 }, + { "TID", 0xf0, 0xf0 } +}; + +int +ahc_scb_scsiid_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SCB_SCSIID_parse_table, 4, "SCB_SCSIID", + 0xb9, regvalue, cur_col, wrap)); +} + +static const ahc_reg_parse_entry_t SCB_LUN_parse_table[] = { + { "SCB_XFERLEN_ODD", 0x80, 0x80 }, + { "LID", 0x3f, 0x3f } +}; + +int +ahc_scb_lun_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(SCB_LUN_parse_table, 2, "SCB_LUN", + 0xba, regvalue, cur_col, wrap)); +} + +int +ahc_scb_tag_print(u_int regvalue, u_int *cur_col, u_int wrap) +{ + return (ahc_print_register(NULL, 0, "SCB_TAG", + 0xbb, regvalue, cur_col, wrap)); +} diff -urpN linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped --- linux-2.6.23-aic-1-debloat/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped 2007-10-09 21:31:38.000000000 +0100 +++ linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped 2007-10-14 15:05:08.000000000 +0100 @@ -5,7 +5,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#58 $ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#40 $ */ -static uint8_t seqprog[] = { +static const uint8_t seqprog[] = { 0xb2, 0x00, 0x00, 0x08, 0xf7, 0x11, 0x22, 0x08, 0x00, 0x65, 0xee, 0x59, ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 3/3] debloat aic7xxx and aic79xx drivers 2007-10-14 15:01 ` [PATCH 2/3] " Denys Vlasenko @ 2007-10-14 15:02 ` Denys Vlasenko 2007-11-01 22:16 ` Matthew Wilcox 0 siblings, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2007-10-14 15:02 UTC (permalink / raw) To: Andrew Morton; +Cc: Hannes Reinecke, linux-scsi, linux-kernel [-- Attachment #1: Type: text/plain, Size: 83 bytes --] Adds more consts Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> -- vda [-- Attachment #2: linux-2.6.23-aic-3-addconst.patch --] [-- Type: text/x-diff, Size: 22270 bytes --] diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx.h linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx.h --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx.h 2007-10-14 15:05:07.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx.h 2007-10-14 15:21:55.000000000 +0100 @@ -813,9 +813,9 @@ struct ahd_tmode_tstate { * to parity errors in each phase table. */ struct ahd_phase_table_entry { - uint8_t phase; - uint8_t mesg_out; /* Message response to parity errors */ - char *phasemsg; + uint8_t phase; + uint8_t mesg_out; /* Message response to parity errors */ + const char *phasemsg; }; /************************** Serial EEPROM Format ******************************/ @@ -1328,9 +1328,9 @@ extern const int ahd_num_aic7770_devs; /******************************************************************************/ /***************************** PCI Front End *********************************/ -struct ahd_pci_identity *ahd_find_pci_device(ahd_dev_softc_t); +const struct ahd_pci_identity *ahd_find_pci_device(ahd_dev_softc_t); int ahd_pci_config(struct ahd_softc *, - struct ahd_pci_identity *); + const struct ahd_pci_identity *); int ahd_pci_test_register_access(struct ahd_softc *); /************************** SCB and SCB queue management **********************/ diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_core.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_core.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_core.c 2007-10-14 15:05:07.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_core.c 2007-10-14 15:21:38.000000000 +0100 @@ -52,7 +52,7 @@ /***************************** Lookup Tables **********************************/ -static char *ahd_chip_names[] = +static const char *const ahd_chip_names[] = { "NONE", "aic7901", @@ -65,11 +65,11 @@ static const u_int num_chip_names = ARRA * Hardware error codes. */ struct ahd_hard_error_entry { - uint8_t errno; - char *errmesg; + uint8_t errno; + const char *errmesg; }; -static struct ahd_hard_error_entry ahd_hard_errors[] = { +static const struct ahd_hard_error_entry ahd_hard_errors[] = { { DSCTMOUT, "Discard Timer has timed out" }, { ILLOPCODE, "Illegal Opcode in sequencer program" }, { SQPARERR, "Sequencer Parity Error" }, @@ -79,7 +79,7 @@ static struct ahd_hard_error_entry ahd_h }; static const u_int num_errors = ARRAY_SIZE(ahd_hard_errors); -static struct ahd_phase_table_entry ahd_phase_table[] = +static const struct ahd_phase_table_entry ahd_phase_table[] = { { P_DATAOUT, MSG_NOOP, "in Data-out phase" }, { P_DATAIN, MSG_INITIATOR_DET_ERR, "in Data-in phase" }, @@ -213,7 +213,7 @@ static void ahd_dumpseq(struct ahd_soft #endif static void ahd_loadseq(struct ahd_softc *ahd); static int ahd_check_patch(struct ahd_softc *ahd, - struct patch **start_patch, + const struct patch **start_patch, u_int start_instr, u_int *skip_addr); static u_int ahd_resolve_seqaddr(struct ahd_softc *ahd, u_int address); @@ -254,7 +254,7 @@ static void ahd_freeze_devq(struct ahd_ struct scb *scb); static void ahd_handle_scb_status(struct ahd_softc *ahd, struct scb *scb); -static struct ahd_phase_table_entry* ahd_lookup_phase_entry(int phase); +static const struct ahd_phase_table_entry* ahd_lookup_phase_entry(int phase); static void ahd_shutdown(void *arg); static void ahd_update_coalescing_values(struct ahd_softc *ahd, u_int timer, @@ -4337,11 +4337,11 @@ ahd_print_devinfo(struct ahd_softc *ahd, devinfo->target, devinfo->lun); } -static struct ahd_phase_table_entry* +static const struct ahd_phase_table_entry* ahd_lookup_phase_entry(int phase) { - struct ahd_phase_table_entry *entry; - struct ahd_phase_table_entry *last_entry; + const struct ahd_phase_table_entry *entry; + const struct ahd_phase_table_entry *last_entry; /* * num_phases doesn't include the default entry which @@ -9358,7 +9358,7 @@ ahd_loadseq(struct ahd_softc *ahd) struct cs cs_table[num_critical_sections]; u_int begin_set[num_critical_sections]; u_int end_set[num_critical_sections]; - struct patch *cur_patch; + const struct patch *cur_patch; u_int cs_count; u_int cur_cs; u_int i; @@ -9513,11 +9513,11 @@ ahd_loadseq(struct ahd_softc *ahd) } static int -ahd_check_patch(struct ahd_softc *ahd, struct patch **start_patch, +ahd_check_patch(struct ahd_softc *ahd, const struct patch **start_patch, u_int start_instr, u_int *skip_addr) { - struct patch *cur_patch; - struct patch *last_patch; + const struct patch *cur_patch; + const struct patch *last_patch; u_int num_patches; num_patches = ARRAY_SIZE(patches); @@ -9551,7 +9551,7 @@ ahd_check_patch(struct ahd_softc *ahd, s static u_int ahd_resolve_seqaddr(struct ahd_softc *ahd, u_int address) { - struct patch *cur_patch; + const struct patch *cur_patch; int address_offset; u_int skip_addr; u_int i; diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_osm.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_osm.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_osm.c 2007-10-14 15:05:07.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_osm.c 2007-10-14 15:20:05.000000000 +0100 @@ -193,7 +193,7 @@ struct ahd_linux_iocell_opts #define AIC79XX_PRECOMP_INDEX 0 #define AIC79XX_SLEWRATE_INDEX 1 #define AIC79XX_AMPLITUDE_INDEX 2 -static struct ahd_linux_iocell_opts aic79xx_iocell_info[] = +static const struct ahd_linux_iocell_opts aic79xx_iocell_info[] = { AIC79XX_DEFAULT_IOOPTS, AIC79XX_DEFAULT_IOOPTS, @@ -557,13 +557,11 @@ ahd_linux_info(struct Scsi_Host *host) bp = &buffer[0]; ahd = *(struct ahd_softc **)host->hostdata; memset(bp, 0, sizeof(buffer)); - strcpy(bp, "Adaptec AIC79XX PCI-X SCSI HBA DRIVER, Rev "); - strcat(bp, AIC79XX_DRIVER_VERSION); - strcat(bp, "\n"); - strcat(bp, " <"); + strcpy(bp, "Adaptec AIC79XX PCI-X SCSI HBA DRIVER, Rev " AIC79XX_DRIVER_VERSION "\n" + " <"); strcat(bp, ahd->description); - strcat(bp, ">\n"); - strcat(bp, " "); + strcat(bp, ">\n" + " "); ahd_controller_info(ahd, ahd_info); strcat(bp, ahd_info); @@ -1148,7 +1146,7 @@ aic79xx_setup(char *s) char *p; char *end; - static struct { + static const struct { const char *name; uint32_t *flag; } options[] = { @@ -1380,7 +1378,7 @@ ahd_platform_init(struct ahd_softc *ahd) * Lookup and commit any modified IO Cell options. */ if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) { - struct ahd_linux_iocell_opts *iocell_opts; + const struct ahd_linux_iocell_opts *iocell_opts; iocell_opts = &aic79xx_iocell_info[ahd->unit]; if (iocell_opts->precomp != AIC79XX_DEFAULT_PRECOMP) @@ -2767,7 +2765,7 @@ static void ahd_linux_set_pcomp_en(struc uint8_t precomp; if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) { - struct ahd_linux_iocell_opts *iocell_opts; + const struct ahd_linux_iocell_opts *iocell_opts; iocell_opts = &aic79xx_iocell_info[ahd->unit]; precomp = iocell_opts->precomp; diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_osm_pci.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_osm_pci.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_osm_pci.c 2007-10-14 15:05:07.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_osm_pci.c 2007-10-14 15:20:05.000000000 +0100 @@ -58,7 +58,7 @@ static void ahd_linux_pci_dev_remove(str ID2C(x), \ ID2C(IDIROC(x)) -static struct pci_device_id ahd_linux_pci_id_table[] = { +static const struct pci_device_id ahd_linux_pci_id_table[] = { /* aic7901 based controllers */ ID(ID_AHA_29320A), ID(ID_AHA_29320ALP), @@ -129,7 +129,7 @@ ahd_linux_pci_dev_probe(struct pci_dev * char buf[80]; struct ahd_softc *ahd; ahd_dev_softc_t pci; - struct ahd_pci_identity *entry; + const struct ahd_pci_identity *entry; char *name; int error; struct device *dev = &pdev->dev; diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_pci.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_pci.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_pci.c 2007-10-14 15:05:07.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_pci.c 2007-10-14 15:20:05.000000000 +0100 @@ -97,7 +97,7 @@ static ahd_device_setup_t ahd_aic7901A_s static ahd_device_setup_t ahd_aic7902_setup; static ahd_device_setup_t ahd_aic790X_setup; -static struct ahd_pci_identity ahd_pci_ident_table[] = +static const struct ahd_pci_identity ahd_pci_ident_table[] = { /* aic7901 based controllers */ { @@ -253,7 +253,7 @@ static void ahd_configure_termination(st static void ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat); static void ahd_pci_intr(struct ahd_softc *ahd); -struct ahd_pci_identity * +const struct ahd_pci_identity * ahd_find_pci_device(ahd_dev_softc_t pci) { uint64_t full_id; @@ -261,7 +261,7 @@ ahd_find_pci_device(ahd_dev_softc_t pci) uint16_t vendor; uint16_t subdevice; uint16_t subvendor; - struct ahd_pci_identity *entry; + const struct ahd_pci_identity *entry; u_int i; vendor = ahd_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2); @@ -292,7 +292,7 @@ ahd_find_pci_device(ahd_dev_softc_t pci) } int -ahd_pci_config(struct ahd_softc *ahd, struct ahd_pci_identity *entry) +ahd_pci_config(struct ahd_softc *ahd, const struct ahd_pci_identity *entry) { struct scb_data *shared_scb_data; u_int command; diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_proc.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_proc.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_proc.c 2007-10-14 15:05:07.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_proc.c 2007-10-14 15:20:05.000000000 +0100 @@ -57,7 +57,7 @@ static int ahd_proc_write_seeprom(struct * Table of syncrates that don't follow the "divisible by 4" * rule. This table will be expanded in future SCSI specs. */ -static struct { +static const struct { u_int period_factor; u_int period; /* in 100ths of ns */ } scsi_syncrates[] = { diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped 2007-10-14 15:05:07.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped 2007-10-14 15:20:05.000000000 +0100 @@ -1027,7 +1027,7 @@ ahd_patch0_func(struct ahd_softc *ahd) return (0); } -static struct patch { +static const struct patch { ahd_patch_func_t *patch_func; uint32_t begin :10, skip_instr :10, @@ -1166,7 +1166,7 @@ static struct patch { { ahd_patch23_func, 815, 11, 1 } }; -static struct cs { +static const struct cs { uint16_t begin; uint16_t end; } critical_sections[] = { diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx.h linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx.h --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx.h 2007-10-14 15:05:07.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx.h 2007-10-14 15:22:14.000000000 +0100 @@ -759,8 +759,8 @@ struct ahc_syncrate { * to parity errors in each phase table. */ struct ahc_phase_table_entry { - uint8_t phase; - uint8_t mesg_out; /* Message response to parity errors */ + uint8_t phase; + uint8_t mesg_out; /* Message response to parity errors */ char *phasemsg; }; @@ -1124,7 +1124,7 @@ typedef int (ahc_device_setup_t)(struct struct ahc_pci_identity { uint64_t full_id; uint64_t id_mask; - char *name; + const char *name; ahc_device_setup_t *setup; }; @@ -1145,9 +1145,9 @@ extern const int ahc_num_aic7770_devs; /******************************************************************************/ /***************************** PCI Front End *********************************/ -struct ahc_pci_identity *ahc_find_pci_device(ahc_dev_softc_t); +const struct ahc_pci_identity *ahc_find_pci_device(ahc_dev_softc_t); int ahc_pci_config(struct ahc_softc *, - struct ahc_pci_identity *); + const struct ahc_pci_identity *); int ahc_pci_test_register_access(struct ahc_softc *); /*************************** EISA/VL Front End ********************************/ diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_93cx6.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_93cx6.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_93cx6.c 2007-10-14 15:05:07.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_93cx6.c 2007-10-14 15:20:05.000000000 +0100 @@ -84,16 +84,16 @@ struct seeprom_cmd { }; /* Short opcodes for the c46 */ -static struct seeprom_cmd seeprom_ewen = {9, {1, 0, 0, 1, 1, 0, 0, 0, 0}}; -static struct seeprom_cmd seeprom_ewds = {9, {1, 0, 0, 0, 0, 0, 0, 0, 0}}; +static const struct seeprom_cmd seeprom_ewen = {9, {1, 0, 0, 1, 1, 0, 0, 0, 0}}; +static const struct seeprom_cmd seeprom_ewds = {9, {1, 0, 0, 0, 0, 0, 0, 0, 0}}; /* Long opcodes for the C56/C66 */ -static struct seeprom_cmd seeprom_long_ewen = {11, {1, 0, 0, 1, 1, 0, 0, 0, 0}}; -static struct seeprom_cmd seeprom_long_ewds = {11, {1, 0, 0, 0, 0, 0, 0, 0, 0}}; +static const struct seeprom_cmd seeprom_long_ewen = {11, {1, 0, 0, 1, 1, 0, 0, 0, 0}}; +static const struct seeprom_cmd seeprom_long_ewds = {11, {1, 0, 0, 0, 0, 0, 0, 0, 0}}; /* Common opcodes */ -static struct seeprom_cmd seeprom_write = {3, {1, 0, 1}}; -static struct seeprom_cmd seeprom_read = {3, {1, 1, 0}}; +static const struct seeprom_cmd seeprom_write = {3, {1, 0, 1}}; +static const struct seeprom_cmd seeprom_read = {3, {1, 1, 0}}; /* * Wait for the SEERDY to go high; about 800 ns. @@ -108,7 +108,7 @@ static struct seeprom_cmd seeprom_read * Send a START condition and the given command */ static void -send_seeprom_cmd(struct seeprom_descriptor *sd, struct seeprom_cmd *cmd) +send_seeprom_cmd(struct seeprom_descriptor *sd, const struct seeprom_cmd *cmd) { uint8_t temp; int i = 0; @@ -227,7 +227,7 @@ int ahc_write_seeprom(struct seeprom_descriptor *sd, uint16_t *buf, u_int start_addr, u_int count) { - struct seeprom_cmd *ewen, *ewds; + const struct seeprom_cmd *ewen, *ewds; uint16_t v; uint8_t temp; int i, k; diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_core.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_core.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_core.c 2007-10-14 15:05:07.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_core.c 2007-10-14 15:21:33.000000000 +0100 @@ -73,7 +73,7 @@ static const u_int num_chip_names = ARRA * Hardware error codes. */ struct ahc_hard_error_entry { - uint8_t errno; + uint8_t errno; const char *errmesg; }; @@ -221,7 +221,7 @@ static void ahc_dumpseq(struct ahc_soft #endif static int ahc_loadseq(struct ahc_softc *ahc); static int ahc_check_patch(struct ahc_softc *ahc, - struct patch **start_patch, + const struct patch **start_patch, u_int start_instr, u_int *skip_addr); static void ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts); @@ -6849,7 +6849,7 @@ ahc_loadseq(struct ahc_softc *ahc) struct cs cs_table[num_critical_sections]; u_int begin_set[num_critical_sections]; u_int end_set[num_critical_sections]; - struct patch *cur_patch; + const struct patch *cur_patch; u_int cs_count; u_int cur_cs; u_int i; @@ -6954,11 +6954,11 @@ ahc_loadseq(struct ahc_softc *ahc) } static int -ahc_check_patch(struct ahc_softc *ahc, struct patch **start_patch, +ahc_check_patch(struct ahc_softc *ahc, const struct patch **start_patch, u_int start_instr, u_int *skip_addr) { - struct patch *cur_patch; - struct patch *last_patch; + const struct patch *cur_patch; + const struct patch *last_patch; u_int num_patches; num_patches = ARRAY_SIZE(patches); @@ -7017,7 +7017,7 @@ ahc_download_instr(struct ahc_softc *ahc case AIC_OP_JE: case AIC_OP_JZ: { - struct patch *cur_patch; + const struct patch *cur_patch; int address_offset; u_int address; u_int skip_addr; diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_osm.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_osm.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_osm.c 2007-10-14 15:05:07.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_osm.c 2007-10-14 15:20:05.000000000 +0100 @@ -511,13 +511,11 @@ ahc_linux_info(struct Scsi_Host *host) bp = &buffer[0]; ahc = *(struct ahc_softc **)host->hostdata; memset(bp, 0, sizeof(buffer)); - strcpy(bp, "Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev "); - strcat(bp, AIC7XXX_DRIVER_VERSION); - strcat(bp, "\n"); - strcat(bp, " <"); + strcpy(bp, "Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev " AIC7XXX_DRIVER_VERSION "\n" + " <"); strcat(bp, ahc->description); - strcat(bp, ">\n"); - strcat(bp, " "); + strcat(bp, ">\n" + " "); ahc_controller_info(ahc, ahc_info); strcat(bp, ahc_info); strcat(bp, "\n"); @@ -1033,7 +1031,7 @@ aic7xxx_setup(char *s) char *p; char *end; - static struct { + static const struct { const char *name; uint32_t *flag; } options[] = { diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 2007-10-14 15:05:08.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c 2007-10-14 15:20:05.000000000 +0100 @@ -55,7 +55,7 @@ static void ahc_linux_pci_dev_remove(str */ #define ID(x) ID_C(x, PCI_CLASS_STORAGE_SCSI) -static struct pci_device_id ahc_linux_pci_id_table[] = { +static const struct pci_device_id ahc_linux_pci_id_table[] = { /* aic7850 based controllers */ ID(ID_AHA_2902_04_10_15_20C_30C), /* aic7860 based controllers */ @@ -231,7 +231,7 @@ ahc_linux_pci_dev_probe(struct pci_dev * const uint64_t mask_39bit = 0x7FFFFFFFFFULL; struct ahc_softc *ahc; ahc_dev_softc_t pci; - struct ahc_pci_identity *entry; + const struct ahc_pci_identity *entry; char *name; int error; struct device *dev = &pdev->dev; diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_pci.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_pci.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_pci.c 2007-10-14 15:05:08.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_pci.c 2007-10-14 15:20:05.000000000 +0100 @@ -168,8 +168,7 @@ static ahc_device_setup_t ahc_aha394XX_s static ahc_device_setup_t ahc_aha494XX_setup; static ahc_device_setup_t ahc_aha398XX_setup; -static struct ahc_pci_identity ahc_pci_ident_table [] = -{ +static const struct ahc_pci_identity ahc_pci_ident_table[] = { /* aic7850 based controllers */ { ID_AHA_2902_04_10_15_20C_30C, @@ -670,7 +669,7 @@ ahc_9005_subdevinfo_valid(uint16_t devic return (result); } -struct ahc_pci_identity * +const struct ahc_pci_identity * ahc_find_pci_device(ahc_dev_softc_t pci) { uint64_t full_id; @@ -678,7 +677,7 @@ ahc_find_pci_device(ahc_dev_softc_t pci) uint16_t vendor; uint16_t subdevice; uint16_t subvendor; - struct ahc_pci_identity *entry; + const struct ahc_pci_identity *entry; u_int i; vendor = ahc_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2); @@ -712,7 +711,7 @@ ahc_find_pci_device(ahc_dev_softc_t pci) } int -ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry) +ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry) { u_int command; u_int our_id; diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_proc.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_proc.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_proc.c 2007-10-14 15:05:08.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_proc.c 2007-10-14 15:20:05.000000000 +0100 @@ -58,7 +58,7 @@ static int ahc_proc_write_seeprom(struct * Table of syncrates that don't follow the "divisible by 4" * rule. This table will be expanded in future SCSI specs. */ -static struct { +static const struct { u_int period_factor; u_int period; /* in 100ths of ns */ } scsi_syncrates[] = { diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped 2007-10-14 15:05:08.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped 2007-10-14 15:20:05.000000000 +0100 @@ -1081,7 +1081,7 @@ ahc_patch0_func(struct ahc_softc *ahc) return (0); } -static struct patch { +static const struct patch { ahc_patch_func_t *patch_func; uint32_t begin :10, skip_instr :10, @@ -1291,7 +1291,7 @@ static struct patch { { ahc_patch4_func, 865, 12, 1 } }; -static struct cs { +static const struct cs { uint16_t begin; uint16_t end; } critical_sections[] = { diff -urpN linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aicasm/aicasm.c linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aicasm/aicasm.c --- linux-2.6.23-aic-2-addstatic/drivers/scsi/aic7xxx/aicasm/aicasm.c 2007-10-14 15:05:11.000000000 +0100 +++ linux-2.6.23-aic-3-addconst/drivers/scsi/aic7xxx/aicasm/aicasm.c 2007-10-14 15:20:05.000000000 +0100 @@ -415,7 +415,7 @@ output_code() } fprintf(ofile, -"static struct patch {\n" +"static const struct patch {\n" " %spatch_func_t *patch_func;\n" " uint32_t begin :10,\n" " skip_instr :10,\n" @@ -435,7 +435,7 @@ output_code() fprintf(ofile, "\n};\n\n"); fprintf(ofile, -"static struct cs {\n" +"static const struct cs {\n" " uint16_t begin;\n" " uint16_t end;\n" "} critical_sections[] = {\n"); ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] debloat aic7xxx and aic79xx drivers 2007-10-14 15:02 ` [PATCH 3/3] " Denys Vlasenko @ 2007-11-01 22:16 ` Matthew Wilcox 2007-11-01 22:23 ` Randy Dunlap 0 siblings, 1 reply; 24+ messages in thread From: Matthew Wilcox @ 2007-11-01 22:16 UTC (permalink / raw) To: Denys Vlasenko; +Cc: Andrew Morton, Hannes Reinecke, linux-scsi, linux-kernel On Sun, Oct 14, 2007 at 04:02:15PM +0100, Denys Vlasenko wrote: > Adds more consts error: patch failed: drivers/scsi/aic7xxx/aic79xx.h:1328 error: drivers/scsi/aic7xxx/aic79xx.h: patch does not apply error: patch failed: drivers/scsi/aic7xxx/aic7xxx.h:1145 error: drivers/scsi/aic7xxx/aic7xxx.h: patch does not apply -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] debloat aic7xxx and aic79xx drivers 2007-11-01 22:16 ` Matthew Wilcox @ 2007-11-01 22:23 ` Randy Dunlap 2007-11-01 23:00 ` Matthew Wilcox 0 siblings, 1 reply; 24+ messages in thread From: Randy Dunlap @ 2007-11-01 22:23 UTC (permalink / raw) To: Matthew Wilcox Cc: Denys Vlasenko, Andrew Morton, Hannes Reinecke, linux-scsi, linux-kernel On Thu, 1 Nov 2007 16:16:04 -0600 Matthew Wilcox wrote: > On Sun, Oct 14, 2007 at 04:02:15PM +0100, Denys Vlasenko wrote: > > Adds more consts > > error: patch failed: drivers/scsi/aic7xxx/aic79xx.h:1328 > error: drivers/scsi/aic7xxx/aic79xx.h: patch does not apply > error: patch failed: drivers/scsi/aic7xxx/aic7xxx.h:1145 > error: drivers/scsi/aic7xxx/aic7xxx.h: patch does not apply when attempting to apply to scsi-misc or linus-git or ... ? Thanks, --- ~Randy ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] debloat aic7xxx and aic79xx drivers 2007-11-01 22:23 ` Randy Dunlap @ 2007-11-01 23:00 ` Matthew Wilcox 0 siblings, 0 replies; 24+ messages in thread From: Matthew Wilcox @ 2007-11-01 23:00 UTC (permalink / raw) To: Randy Dunlap Cc: Denys Vlasenko, Andrew Morton, Hannes Reinecke, linux-scsi, linux-kernel On Thu, Nov 01, 2007 at 03:23:28PM -0700, Randy Dunlap wrote: > when attempting to apply to scsi-misc or linus-git or ... ? scsi-misc -- Intel are signing my paycheques ... these opinions are still mine "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/3] debloat aic7xxx and aic79xx drivers
@ 2007-08-31 15:13 Denys Vlasenko
2007-08-31 15:15 ` [PATCH 1/3] " Denys Vlasenko
0 siblings, 1 reply; 24+ messages in thread
From: Denys Vlasenko @ 2007-08-31 15:13 UTC (permalink / raw)
To: Hannes Reinecke
Cc: Jan Engelhardt, Matthew Wilcox, Denys Vlasenko, Arjan van de Ven,
Adrian Bunk, Andrew Morton, linux-scsi, linux-kernel
On Friday 31 August 2007 14:42, Hannes Reinecke wrote:
> Jan Engelhardt wrote:
> > On Aug 30 2007 13:02, Matthew Wilcox wrote:
> >>> Well, you can send it to Linus/Andrew, that will usually upset people
> >>> and they start commenting on it. Or they don't, and everything is fine.
> >>> (The "default y" approach so to speak ;-)
> >>
> >> The problem is that we don't really have a maintainer for the aic7xyz
> >> drivers any more. Volunteers welcome. NOT IT!
> >
> > Take it before someone else does!
>
> Well, the semi-official maintainers are James B. and me.
>
> So I might as well do it officially.
Cool.
Thanks to Arjan's insistence, I also took a look at adding statics
and unexpectedly discovered yet another 50 kbytes of dead code
(I'm not kidding).
Attached are three patches which fix that:
text data bss dec hex filename
261433 50018 1172 312623 4c52f linux-2.6.23-rc1.org.t/drivers/scsi/aic7xxx/built-in.o
199654 50018 1172 250844 3d3dc linux-2.6.23-rc1.aic.t/drivers/scsi/aic7xxx/built-in.o
184014 21314 1172 206500 326a4 linux-2.6.23-rc1.aic1.t/drivers/scsi/aic7xxx/built-in.o
202378 2850 1172 206400 32640 linux-2.6.23-rc1.aic2.t/drivers/scsi/aic7xxx/built-in.o
1-debloat.patch deinlines a lot of functions
2-addstatic.patch adds statics, #ifdefs out huge amount of unused code, adds consts
3-addconst.patch adds more consts
make namespacecheck goes from 400+ functions to:
drivers/scsi/aic7xxx/aic79xx_core.o
ahd_inq
ahd_inw
ahd_outq
ahd_outw
drivers/scsi/aic7xxx/aic79xx_osm.o
ahd_insb
drivers/scsi/aic7xxx/aic7xxx_core.o
ahc_inq
ahc_outq
drivers/scsi/aic7xxx/aic7xxx_osm.o
ahc_insb
None of these patches actually touch any logic, code changes
are pretty minimal.
Compile tested and applies cleanly to 2.6.23-rc1, applies with some fuzz to 2.6.23-rc3.
Please propagate to mainline.
--
vda
^ permalink raw reply [flat|nested] 24+ messages in thread* [PATCH 1/3] debloat aic7xxx and aic79xx drivers 2007-08-31 15:13 [PATCH 0/3] " Denys Vlasenko @ 2007-08-31 15:15 ` Denys Vlasenko 2007-08-31 15:16 ` [PATCH 2/3] " Denys Vlasenko 0 siblings, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2007-08-31 15:15 UTC (permalink / raw) To: Hannes Reinecke Cc: Jan Engelhardt, Matthew Wilcox, Arjan van de Ven, Adrian Bunk, Andrew Morton, linux-scsi, linux-kernel [-- Attachment #1: Type: text/plain, Size: 730 bytes --] On Friday 31 August 2007 16:13, Denys Vlasenko wrote: > Attached are three patches which fix that: > > text data bss dec hex filename > 261433 50018 1172 312623 4c52f linux-2.6.23-rc1.org.t/drivers/scsi/aic7xxx/built-in.o > 199654 50018 1172 250844 3d3dc linux-2.6.23-rc1.aic.t/drivers/scsi/aic7xxx/built-in.o > 184014 21314 1172 206500 326a4 linux-2.6.23-rc1.aic1.t/drivers/scsi/aic7xxx/built-in.o > 202378 2850 1172 206400 32640 linux-2.6.23-rc1.aic2.t/drivers/scsi/aic7xxx/built-in.o > > 1-debloat.patch deinlines a lot of functions > 2-addstatic.patch adds statics, #ifdefs out huge amount of unused code, adds consts > 3-addconst.patch adds more consts -- vda [-- Attachment #2: linux-2.6.23-rc1-aic7xxx-1-debloat.patch.bz2 --] [-- Type: application/x-bzip2, Size: 14393 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 2/3] debloat aic7xxx and aic79xx drivers 2007-08-31 15:15 ` [PATCH 1/3] " Denys Vlasenko @ 2007-08-31 15:16 ` Denys Vlasenko 2007-08-31 15:17 ` [PATCH 3/3] " Denys Vlasenko 0 siblings, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2007-08-31 15:16 UTC (permalink / raw) To: Hannes Reinecke Cc: Jan Engelhardt, Matthew Wilcox, Arjan van de Ven, Adrian Bunk, Andrew Morton, linux-scsi, linux-kernel [-- Attachment #1: Type: text/plain, Size: 807 bytes --] On Friday 31 August 2007 16:15, Denys Vlasenko wrote: > On Friday 31 August 2007 16:13, Denys Vlasenko wrote: > > Attached are three patches which fix that: > > > > text data bss dec hex filename > > 261433 50018 1172 312623 4c52f linux-2.6.23-rc1.org.t/drivers/scsi/aic7xxx/built-in.o > > 199654 50018 1172 250844 3d3dc linux-2.6.23-rc1.aic.t/drivers/scsi/aic7xxx/built-in.o > > 184014 21314 1172 206500 326a4 linux-2.6.23-rc1.aic1.t/drivers/scsi/aic7xxx/built-in.o > > 202378 2850 1172 206400 32640 linux-2.6.23-rc1.aic2.t/drivers/scsi/aic7xxx/built-in.o > > > > 1-debloat.patch deinlines a lot of functions > > 2-addstatic.patch adds statics, #ifdefs out huge amount of unused code, adds consts > > 3-addconst.patch adds more consts -- vda [-- Attachment #2: linux-2.6.23-rc1-aic7xxx-2-addstatic.patch.bz2 --] [-- Type: application/x-bzip2, Size: 21343 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 3/3] debloat aic7xxx and aic79xx drivers 2007-08-31 15:16 ` [PATCH 2/3] " Denys Vlasenko @ 2007-08-31 15:17 ` Denys Vlasenko 2007-09-24 10:24 ` Hannes Reinecke 0 siblings, 1 reply; 24+ messages in thread From: Denys Vlasenko @ 2007-08-31 15:17 UTC (permalink / raw) To: Hannes Reinecke Cc: Jan Engelhardt, Matthew Wilcox, Arjan van de Ven, Adrian Bunk, Andrew Morton, linux-scsi, linux-kernel [-- Attachment #1: Type: text/plain, Size: 886 bytes --] On Friday 31 August 2007 16:16, Denys Vlasenko wrote: > On Friday 31 August 2007 16:15, Denys Vlasenko wrote: > > On Friday 31 August 2007 16:13, Denys Vlasenko wrote: > > > Attached are three patches which fix that: > > > > > > text data bss dec hex filename > > > 261433 50018 1172 312623 4c52f linux-2.6.23-rc1.org.t/drivers/scsi/aic7xxx/built-in.o > > > 199654 50018 1172 250844 3d3dc linux-2.6.23-rc1.aic.t/drivers/scsi/aic7xxx/built-in.o > > > 184014 21314 1172 206500 326a4 linux-2.6.23-rc1.aic1.t/drivers/scsi/aic7xxx/built-in.o > > > 202378 2850 1172 206400 32640 linux-2.6.23-rc1.aic2.t/drivers/scsi/aic7xxx/built-in.o > > > > > > 1-debloat.patch deinlines a lot of functions > > > 2-addstatic.patch adds statics, #ifdefs out huge amount of unused code, adds consts > > > 3-addconst.patch adds more consts -- vda [-- Attachment #2: linux-2.6.23-rc1-aic7xxx-3-addconst.patch.bz2 --] [-- Type: application/x-bzip2, Size: 4229 bytes --] ^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 3/3] debloat aic7xxx and aic79xx drivers 2007-08-31 15:17 ` [PATCH 3/3] " Denys Vlasenko @ 2007-09-24 10:24 ` Hannes Reinecke 0 siblings, 0 replies; 24+ messages in thread From: Hannes Reinecke @ 2007-09-24 10:24 UTC (permalink / raw) To: Denys Vlasenko Cc: Jan Engelhardt, Matthew Wilcox, Arjan van de Ven, Adrian Bunk, Andrew Morton, linux-scsi, linux-kernel Denys Vlasenko wrote: > On Friday 31 August 2007 16:16, Denys Vlasenko wrote: >> On Friday 31 August 2007 16:15, Denys Vlasenko wrote: >>> On Friday 31 August 2007 16:13, Denys Vlasenko wrote: >>>> Attached are three patches which fix that: >>>> >>>> text data bss dec hex filename >>>> 261433 50018 1172 312623 4c52f linux-2.6.23-rc1.org.t/drivers/scsi/aic7xxx/built-in.o >>>> 199654 50018 1172 250844 3d3dc linux-2.6.23-rc1.aic.t/drivers/scsi/aic7xxx/built-in.o >>>> 184014 21314 1172 206500 326a4 linux-2.6.23-rc1.aic1.t/drivers/scsi/aic7xxx/built-in.o >>>> 202378 2850 1172 206400 32640 linux-2.6.23-rc1.aic2.t/drivers/scsi/aic7xxx/built-in.o >>>> >>>> 1-debloat.patch deinlines a lot of functions >>>> 2-addstatic.patch adds statics, #ifdefs out huge amount of unused code, adds consts >>>> 3-addconst.patch adds more consts Signed-off-by: Hannes Reinecke <hare@suse.de> Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Markus Rex, HRB 16746 (AG Nürnberg) - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2008-04-21 5:10 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-23 3:40 [PATCH 0/3] debloat aic7xxx and aic79xx drivers Denys Vlasenko
2008-03-23 3:41 ` [PATCH 1/3] " Denys Vlasenko
2008-03-23 3:42 ` [PATCH 2/3] " Denys Vlasenko
2008-03-23 3:42 ` [PATCH 3/3] " Denys Vlasenko
2008-04-07 10:36 ` Hannes Reinecke
2008-04-07 10:34 ` [PATCH 2/3] " Hannes Reinecke
2008-04-07 18:00 ` Denys Vlasenko
2008-04-08 12:23 ` Hannes Reinecke
2008-04-08 14:08 ` Denys Vlasenko
2008-04-08 14:54 ` Hannes Reinecke
2008-04-08 15:08 ` Denys Vlasenko
2008-04-14 18:47 ` Denys Vlasenko
[not found] ` <4804BE68.4000704@suse.de>
2008-04-15 20:10 ` Denys Vlasenko
2008-04-21 5:10 ` Denys Vlasenko
2008-04-14 18:46 ` Denys Vlasenko
2008-04-15 14:44 ` Hannes Reinecke
2008-04-07 10:31 ` [PATCH 1/3] " Hannes Reinecke
2008-04-07 18:01 ` Denys Vlasenko
-- strict thread matches above, loose matches on Subject: below --
2007-10-14 14:58 [PATCH 0/3] " Denys Vlasenko
2007-10-14 15:00 ` [PATCH 1/3] " Denys Vlasenko
2007-10-14 15:01 ` [PATCH 2/3] " Denys Vlasenko
2007-10-14 15:02 ` [PATCH 3/3] " Denys Vlasenko
2007-11-01 22:16 ` Matthew Wilcox
2007-11-01 22:23 ` Randy Dunlap
2007-11-01 23:00 ` Matthew Wilcox
2007-08-31 15:13 [PATCH 0/3] " Denys Vlasenko
2007-08-31 15:15 ` [PATCH 1/3] " Denys Vlasenko
2007-08-31 15:16 ` [PATCH 2/3] " Denys Vlasenko
2007-08-31 15:17 ` [PATCH 3/3] " Denys Vlasenko
2007-09-24 10:24 ` Hannes Reinecke
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).