[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ahc testers needed



Hi,

  In the process to port atw (adm8211) wireless driver from NetBSD, I need
people with ahc (both isa and pci) to test the followin diff on -current
systems, adding DEBUG to the kernel config.
  Send dmesg output as well as any problems to me privately.
  Thanks,

  f.-

Index: sys/arch/i386/isa/ahc_isa.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/isa/ahc_isa.c,v
retrieving revision 1.10
diff -u -p -r1.10 ahc_isa.c
--- sys/arch/i386/isa/ahc_isa.c	2002/06/28 00:34:54	1.10
+++ sys/arch/i386/isa/ahc_isa.c	2003/08/07 16:38:34
@@ -516,6 +516,9 @@ aha2840_load_seeprom(struct ahc_softc *a
 	u_int8_t  scsi_conf;
 	int	  have_seeprom;
 
+	sd.sd_tag = ahc->tag;
+	sd.sd_bsh = ahc->bsh;
+	sd.sd_regsize = 1;
 	sd.sd_control_offset = SEECTL_2840;
 	sd.sd_status_offset = STATUS_2840;
 	sd.sd_dataout_offset = STATUS_2840;		
Index: sys/conf/files
===================================================================
RCS file: /cvs/src/sys/conf/files,v
retrieving revision 1.275
diff -u -p -r1.275 files
--- sys/conf/files	2003/07/24 08:03:19	1.275
+++ sys/conf/files	2003/08/07 16:38:42
@@ -73,6 +73,10 @@ define	wskbddev {[console = -1], [mux = 
 define	wsmousedev {[mux = -1]}
 define	wsrasteremulops
 
+# SMC 93Cx6 Serial EEPROM devices
+define	smc93cx6
+file	dev/ic/smc93cx6.c		smc93cx6
+
 # common PC display functions
 define	pcdisplayops
 file	dev/ic/pcdisplay_subr.c		pcdisplayops
@@ -103,10 +107,9 @@ file	dev/ic/wdc.c wdc_base
 # contain the cfdrivers.  Attachments are provided by files.<bus>
 
 # Adaptec 2[789]4X, 394X, aic7770 and aic78[5678]0 SCSI controllers
-device	ahc: scsi
+device	ahc: scsi, smc93cx6
 file	dev/ic/aic7xxx.c		ahc
 file	dev/ic/aic7xxx_openbsd.c	ahc
-file	dev/ic/smc93cx6.c		ahc
 
 # Adaptec AIC-6[23]60 SCSI controllers
 device	aic: scsi
Index: sys/dev/ic/smc93cx6var.h
===================================================================
RCS file: /cvs/src/sys/dev/ic/smc93cx6var.h,v
retrieving revision 1.12
diff -u -p -r1.12 smc93cx6var.h
--- sys/dev/ic/smc93cx6var.h	2002/06/30 19:36:59	1.12
+++ sys/dev/ic/smc93cx6var.h	2003/08/07 16:38:42
@@ -52,7 +52,9 @@ typedef enum {
 } seeprom_chip_t;
 
 struct seeprom_descriptor {
-	struct ahc_softc *sd_ahc;
+	bus_space_tag_t sd_tag;
+	bus_space_handle_t sd_bsh;
+	bus_size_t sd_regsize;
 	bus_size_t sd_control_offset;
 	bus_size_t sd_status_offset;
 	bus_size_t sd_dataout_offset;
@@ -82,17 +84,35 @@ struct seeprom_descriptor {
  */
 
 #define	SEEPROM_INB(sd) \
-	ahc_inb(sd->sd_ahc, sd->sd_control_offset)
+	(((sd)->sd_regsize == 4) \
+	    ? bus_space_read_4((sd)->sd_tag, (sd)->sd_bsh, \
+	          (sd)->sd_control_offset) \
+	    : bus_space_read_1((sd)->sd_tag, (sd)->sd_bsh, \
+	          (sd)->sd_control_offset))
+
 #define	SEEPROM_OUTB(sd, value) \
-do {								\
-	ahc_outb(sd->sd_ahc, sd->sd_control_offset, value);	\
-	ahc_flush_device_writes(sd->sd_ahc);			\
+do { \
+	if ((sd)->sd_regsize == 4) \
+		bus_space_write_4((sd)->sd_tag, (sd)->sd_bsh, \
+		    (sd)->sd_control_offset, (value)); \
+	else \
+		bus_space_write_1((sd)->sd_tag, (sd)->sd_bsh, \
+		    (sd)->sd_control_offset, (u_int8_t) (value)); \
 } while(0)
 
 #define	SEEPROM_STATUS_INB(sd) \
-	ahc_inb(sd->sd_ahc, sd->sd_status_offset)
+	(((sd)->sd_regsize == 4) \
+	    ? bus_space_read_4((sd)->sd_tag, (sd)->sd_bsh, \
+	          (sd)->sd_status_offset) \
+	    : bus_space_read_1((sd)->sd_tag, (sd)->sd_bsh, \
+	          (sd)->sd_status_offset))
+
 #define	SEEPROM_DATA_INB(sd) \
-	ahc_inb(sd->sd_ahc, sd->sd_dataout_offset)
+	(((sd)->sd_regsize == 4) \
+	    ? bus_space_read_4((sd)->sd_tag, (sd)->sd_bsh, \
+	          (sd)->sd_dataout_offset) \
+	    : bus_space_read_1((sd)->sd_tag, (sd)->sd_bsh, \
+	          (sd)->sd_dataout_offset))
 
 int read_seeprom(struct seeprom_descriptor *sd, u_int16_t *buf,
 		 bus_size_t start_addr, bus_size_t count);
Index: sys/dev/pci/ahc_pci.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/ahc_pci.c,v
retrieving revision 1.38
diff -u -p -r1.38 ahc_pci.c
--- sys/dev/pci/ahc_pci.c	2003/07/25 09:49:21	1.38
+++ sys/dev/pci/ahc_pci.c	2003/08/07 16:38:45
@@ -947,7 +947,9 @@ check_extport(ahc, sxfrctl1)
 	int	have_seeprom;
 	int	have_autoterm;
 	
-	sd.sd_ahc = ahc;
+	sd.sd_tag = ahc->tag;
+	sd.sd_bsh = ahc->bsh;
+	sd.sd_regsize = 1;
 	sd.sd_control_offset = SEECTL;		
 	sd.sd_status_offset = SEECTL;		
 	sd.sd_dataout_offset = SEECTL;