ncr.c (108470) | ncr.c (109623) |
---|---|
1/************************************************************************** 2** | 1/************************************************************************** 2** |
3** $FreeBSD: head/sys/pci/ncr.c 108470 2002-12-30 21:18:15Z schweikh $ | 3** $FreeBSD: head/sys/pci/ncr.c 109623 2003-01-21 08:56:16Z alfred $ |
4** 5** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family. 6** 7**------------------------------------------------------------------------- 8** 9** Written for 386bsd and FreeBSD by 10** Wolfgang Stanglmeier <wolf@cologne.de> 11** Stefan Esser <se@mi.Uni-Koeln.de> --- 1289 unchanged lines hidden (view full) --- 1301** 1302** 1303**========================================================== 1304*/ 1305 1306 1307#if !defined(lint) 1308static const char ident[] = | 4** 5** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family. 6** 7**------------------------------------------------------------------------- 8** 9** Written for 386bsd and FreeBSD by 10** Wolfgang Stanglmeier <wolf@cologne.de> 11** Stefan Esser <se@mi.Uni-Koeln.de> --- 1289 unchanged lines hidden (view full) --- 1301** 1302** 1303**========================================================== 1304*/ 1305 1306 1307#if !defined(lint) 1308static const char ident[] = |
1309 "\n$FreeBSD: head/sys/pci/ncr.c 108470 2002-12-30 21:18:15Z schweikh $\n"; | 1309 "\n$FreeBSD: head/sys/pci/ncr.c 109623 2003-01-21 08:56:16Z alfred $\n"; |
1310#endif 1311 1312static const u_long ncr_version = NCR_VERSION * 11 1313 + (u_long) sizeof (struct ncb) * 7 1314 + (u_long) sizeof (struct nccb) * 5 1315 + (u_long) sizeof (struct lcb) * 3 1316 + (u_long) sizeof (struct tcb) * 2; 1317 --- 2279 unchanged lines hidden (view full) --- 3597 np->bst2 = rman_get_bustag(np->sram_res); 3598 np->bsh2 = rman_get_bushandle(np->sram_res); 3599 } else if (sizeof (struct script) > PAGE_SIZE) { 3600 np->script = (struct script*) vm_page_alloc_contig 3601 (round_page(sizeof (struct script)), 3602 0, 0xffffffff, PAGE_SIZE); 3603 } else { 3604 np->script = (struct script *) | 1310#endif 1311 1312static const u_long ncr_version = NCR_VERSION * 11 1313 + (u_long) sizeof (struct ncb) * 7 1314 + (u_long) sizeof (struct nccb) * 5 1315 + (u_long) sizeof (struct lcb) * 3 1316 + (u_long) sizeof (struct tcb) * 2; 1317 --- 2279 unchanged lines hidden (view full) --- 3597 np->bst2 = rman_get_bustag(np->sram_res); 3598 np->bsh2 = rman_get_bushandle(np->sram_res); 3599 } else if (sizeof (struct script) > PAGE_SIZE) { 3600 np->script = (struct script*) vm_page_alloc_contig 3601 (round_page(sizeof (struct script)), 3602 0, 0xffffffff, PAGE_SIZE); 3603 } else { 3604 np->script = (struct script *) |
3605 malloc (sizeof (struct script), M_DEVBUF, M_WAITOK); | 3605 malloc (sizeof (struct script), M_DEVBUF, 0); |
3606 } 3607 3608 /* XXX JGibbs - Use contigmalloc */ 3609 if (sizeof (struct scripth) > PAGE_SIZE) { 3610 np->scripth = (struct scripth*) vm_page_alloc_contig 3611 (round_page(sizeof (struct scripth)), 3612 0, 0xffffffff, PAGE_SIZE); 3613 } else 3614 { 3615 np->scripth = (struct scripth *) | 3606 } 3607 3608 /* XXX JGibbs - Use contigmalloc */ 3609 if (sizeof (struct scripth) > PAGE_SIZE) { 3610 np->scripth = (struct scripth*) vm_page_alloc_contig 3611 (round_page(sizeof (struct scripth)), 3612 0, 0xffffffff, PAGE_SIZE); 3613 } else 3614 { 3615 np->scripth = (struct scripth *) |
3616 malloc (sizeof (struct scripth), M_DEVBUF, M_WAITOK); | 3616 malloc (sizeof (struct scripth), M_DEVBUF, 0); |
3617 } 3618 3619#ifdef SCSI_NCR_PCI_CONFIG_FIXUP 3620 /* 3621 ** If cache line size is enabled, check PCI config space and 3622 ** try to fix it up if necessary. 3623 */ 3624#ifdef PCIR_CACHELNSZ /* To be sure that new PCI stuff is present */ --- 3539 unchanged lines hidden --- | 3617 } 3618 3619#ifdef SCSI_NCR_PCI_CONFIG_FIXUP 3620 /* 3621 ** If cache line size is enabled, check PCI config space and 3622 ** try to fix it up if necessary. 3623 */ 3624#ifdef PCIR_CACHELNSZ /* To be sure that new PCI stuff is present */ --- 3539 unchanged lines hidden --- |