ahc_pci.c (47275) | ahc_pci.c (47505) |
---|---|
1/* 2 * Product specific probe and attach routines for: 3 * 3940, 2940, aic7895, aic7890, aic7880, 4 * aic7870, aic7860 and aic7850 SCSI controllers 5 * 6 * Copyright (c) 1995, 1996, 1997, 1998 Justin T. Gibbs 7 * All rights reserved. 8 * --- 20 unchanged lines hidden (view full) --- 29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * | 1/* 2 * Product specific probe and attach routines for: 3 * 3940, 2940, aic7895, aic7890, aic7880, 4 * aic7870, aic7860 and aic7850 SCSI controllers 5 * 6 * Copyright (c) 1995, 1996, 1997, 1998 Justin T. Gibbs 7 * All rights reserved. 8 * --- 20 unchanged lines hidden (view full) --- 29 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * |
37 * $Id: ahc_pci.c,v 1.12 1999/05/14 17:38:07 gibbs Exp $ | 37 * $Id: ahc_pci.c,v 1.13 1999/05/17 21:53:09 gibbs Exp $ |
38 */ 39 40#include <pci.h> 41#if NPCI > 0 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> 45#include <sys/module.h> --- 1490 unchanged lines hidden (view full) --- 1536 1537static int 1538ahc_aic7890_setup(device_t dev, char *channel, ahc_chip *chip, 1539 ahc_feature *features, ahc_flag *flags) 1540{ 1541 *channel = 'A'; 1542 *chip = AHC_AIC7890; 1543 *features = AHC_AIC7890_FE; | 38 */ 39 40#include <pci.h> 41#if NPCI > 0 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> 45#include <sys/module.h> --- 1490 unchanged lines hidden (view full) --- 1536 1537static int 1538ahc_aic7890_setup(device_t dev, char *channel, ahc_chip *chip, 1539 ahc_feature *features, ahc_flag *flags) 1540{ 1541 *channel = 'A'; 1542 *chip = AHC_AIC7890; 1543 *features = AHC_AIC7890_FE; |
1544 *flags |= AHC_NEWEEPROM_FMT; |
|
1544 return (0); 1545} 1546 1547static int 1548ahc_aic7895_setup(device_t dev, char *channel, ahc_chip *chip, 1549 ahc_feature *features, ahc_flag *flags) 1550{ 1551 u_int32_t devconfig; 1552 1553 *channel = pci_get_function(dev) == 1 ? 'B' : 'A'; 1554 *chip = AHC_AIC7895; 1555 *features = AHC_AIC7895_FE; | 1545 return (0); 1546} 1547 1548static int 1549ahc_aic7895_setup(device_t dev, char *channel, ahc_chip *chip, 1550 ahc_feature *features, ahc_flag *flags) 1551{ 1552 u_int32_t devconfig; 1553 1554 *channel = pci_get_function(dev) == 1 ? 'B' : 'A'; 1555 *chip = AHC_AIC7895; 1556 *features = AHC_AIC7895_FE; |
1557 *flags |= AHC_NEWEEPROM_FMT; |
|
1556 devconfig = pci_read_config(dev, DEVCONFIG, /*bytes*/4); 1557 devconfig &= ~SCBSIZE32; 1558 pci_write_config(dev, DEVCONFIG, devconfig, /*bytes*/4); 1559 return (0); 1560} 1561 1562static int 1563ahc_aic7896_setup(device_t dev, char *channel, ahc_chip *chip, 1564 ahc_feature *features, ahc_flag *flags) 1565{ 1566 *channel = pci_get_function(dev) == 1 ? 'B' : 'A'; 1567 *chip = AHC_AIC7896; 1568 *features = AHC_AIC7896_FE; | 1558 devconfig = pci_read_config(dev, DEVCONFIG, /*bytes*/4); 1559 devconfig &= ~SCBSIZE32; 1560 pci_write_config(dev, DEVCONFIG, devconfig, /*bytes*/4); 1561 return (0); 1562} 1563 1564static int 1565ahc_aic7896_setup(device_t dev, char *channel, ahc_chip *chip, 1566 ahc_feature *features, ahc_flag *flags) 1567{ 1568 *channel = pci_get_function(dev) == 1 ? 'B' : 'A'; 1569 *chip = AHC_AIC7896; 1570 *features = AHC_AIC7896_FE; |
1571 *flags |= AHC_NEWEEPROM_FMT; |
|
1569 return (0); 1570} 1571 1572static int 1573ahc_raid_setup(device_t dev, char *channel, ahc_chip *chip, 1574 ahc_feature *features, ahc_flag *flags) 1575{ 1576 printf("RAID functionality unsupported\n"); --- 46 unchanged lines hidden --- | 1572 return (0); 1573} 1574 1575static int 1576ahc_raid_setup(device_t dev, char *channel, ahc_chip *chip, 1577 ahc_feature *features, ahc_flag *flags) 1578{ 1579 printf("RAID functionality unsupported\n"); --- 46 unchanged lines hidden --- |