solo.c (d95502a8381196524939cc458b2ab90d76ac85a4) | solo.c (733a4ea771adb552fffe9b1e1d1d1ee654384dcf) |
---|---|
1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 890 unchanged lines hidden (view full) --- 899static int 900ess_attach(device_t dev) 901{ 902 struct ess_info *sc; 903 char status[SND_STATUSLEN]; 904 u_int16_t ddma; 905 u_int32_t data; 906 | 1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 890 unchanged lines hidden (view full) --- 899static int 900ess_attach(device_t dev) 901{ 902 struct ess_info *sc; 903 char status[SND_STATUSLEN]; 904 u_int16_t ddma; 905 u_int32_t data; 906 |
907 sc = (struct ess_info *)malloc(sizeof *sc, M_DEVBUF, M_NOWAIT); | 907 sc = (struct ess_info *)malloc(sizeof *sc, M_DEVBUF, M_NOWAIT | M_ZERO); |
908 if (!sc) 909 return ENXIO; | 908 if (!sc) 909 return ENXIO; |
910 bzero(sc, sizeof *sc); | |
911 912 data = pci_read_config(dev, PCIR_COMMAND, 2); 913 data |= PCIM_CMD_PORTEN | PCIM_CMD_BUSMASTEREN; 914 pci_write_config(dev, PCIR_COMMAND, data, 2); 915 data = pci_read_config(dev, PCIR_COMMAND, 2); 916 917 if (ess_alloc_resources(sc, dev)) 918 goto no; --- 96 unchanged lines hidden --- | 910 911 data = pci_read_config(dev, PCIR_COMMAND, 2); 912 data |= PCIM_CMD_PORTEN | PCIM_CMD_BUSMASTEREN; 913 pci_write_config(dev, PCIR_COMMAND, data, 2); 914 data = pci_read_config(dev, PCIR_COMMAND, 2); 915 916 if (ess_alloc_resources(sc, dev)) 917 goto no; --- 96 unchanged lines hidden --- |