isp_pci.c (108549) | isp_pci.c (109623) |
---|---|
1/* $FreeBSD: head/sys/dev/isp/isp_pci.c 108549 2003-01-02 04:21:52Z mjacob $ */ | 1/* $FreeBSD: head/sys/dev/isp/isp_pci.c 109623 2003-01-21 08:56:16Z alfred $ */ |
2/* 3 * PCI specific probe and attach routines for Qlogic ISP SCSI adapters. 4 * FreeBSD Version. 5 * 6 * Copyright (c) 1997, 1998, 1999, 2000, 2001 by Matthew Jacob 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 609 unchanged lines hidden (view full) --- 619 size_t amt = 0; 620 if (IS_2200(isp)) { 621 amt = QLA2200_RISC_IMAGE_DUMP_SIZE; 622 } else if (IS_23XX(isp)) { 623 amt = QLA2300_RISC_IMAGE_DUMP_SIZE; 624 } 625 if (amt) { 626 FCPARAM(isp)->isp_dump_data = | 2/* 3 * PCI specific probe and attach routines for Qlogic ISP SCSI adapters. 4 * FreeBSD Version. 5 * 6 * Copyright (c) 1997, 1998, 1999, 2000, 2001 by Matthew Jacob 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 609 unchanged lines hidden (view full) --- 619 size_t amt = 0; 620 if (IS_2200(isp)) { 621 amt = QLA2200_RISC_IMAGE_DUMP_SIZE; 622 } else if (IS_23XX(isp)) { 623 amt = QLA2300_RISC_IMAGE_DUMP_SIZE; 624 } 625 if (amt) { 626 FCPARAM(isp)->isp_dump_data = |
627 malloc(amt, M_DEVBUF, M_WAITOK | M_ZERO); | 627 malloc(amt, M_DEVBUF, M_ZERO); |
628 } else { 629 device_printf(dev, 630 "f/w crash dumps not supported for this model\n"); 631 } 632 } 633#endif 634 635 sptr = 0; --- 464 unchanged lines hidden (view full) --- 1100 NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0, &pcs->dmat)) { 1101 isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); 1102 ISP_LOCK(isp); 1103 return(1); 1104 } 1105 1106 1107 len = sizeof (XS_T **) * isp->isp_maxcmds; | 628 } else { 629 device_printf(dev, 630 "f/w crash dumps not supported for this model\n"); 631 } 632 } 633#endif 634 635 sptr = 0; --- 464 unchanged lines hidden (view full) --- 1100 NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0, &pcs->dmat)) { 1101 isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); 1102 ISP_LOCK(isp); 1103 return(1); 1104 } 1105 1106 1107 len = sizeof (XS_T **) * isp->isp_maxcmds; |
1108 isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); | 1108 isp->isp_xflist = (XS_T **) malloc(len, M_DEVBUF, M_ZERO); |
1109 if (isp->isp_xflist == NULL) { 1110 isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array"); 1111 ISP_LOCK(isp); 1112 return (1); 1113 } 1114 len = sizeof (bus_dmamap_t) * isp->isp_maxcmds; | 1109 if (isp->isp_xflist == NULL) { 1110 isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array"); 1111 ISP_LOCK(isp); 1112 return (1); 1113 } 1114 len = sizeof (bus_dmamap_t) * isp->isp_maxcmds; |
1115 pcs->dmaps = (bus_dmamap_t *) malloc(len, M_DEVBUF, M_WAITOK); | 1115 pcs->dmaps = (bus_dmamap_t *) malloc(len, M_DEVBUF, 0); |
1116 if (pcs->dmaps == NULL) { 1117 isp_prt(isp, ISP_LOGERR, "can't alloc dma map storage"); 1118 free(isp->isp_xflist, M_DEVBUF); 1119 ISP_LOCK(isp); 1120 return (1); 1121 } 1122 1123 /* --- 787 unchanged lines hidden --- | 1116 if (pcs->dmaps == NULL) { 1117 isp_prt(isp, ISP_LOGERR, "can't alloc dma map storage"); 1118 free(isp->isp_xflist, M_DEVBUF); 1119 ISP_LOCK(isp); 1120 return (1); 1121 } 1122 1123 /* --- 787 unchanged lines hidden --- |