.. | .. |
---|
29 | 29 | static unsigned int ilo_major; |
---|
30 | 30 | static unsigned int max_ccb = 16; |
---|
31 | 31 | static char ilo_hwdev[MAX_ILO_DEV]; |
---|
| 32 | +static const struct pci_device_id ilo_blacklist[] = { |
---|
| 33 | + /* auxiliary iLO */ |
---|
| 34 | + {PCI_DEVICE_SUB(PCI_VENDOR_ID_HP, 0x3307, PCI_VENDOR_ID_HP, 0x1979)}, |
---|
| 35 | + /* CL */ |
---|
| 36 | + {PCI_DEVICE_SUB(PCI_VENDOR_ID_HP, 0x3307, PCI_VENDOR_ID_HP_3PAR, 0x0289)}, |
---|
| 37 | + {} |
---|
| 38 | +}; |
---|
32 | 39 | |
---|
33 | 40 | static inline int get_entry_id(int entry) |
---|
34 | 41 | { |
---|
.. | .. |
---|
200 | 207 | static inline int fifo_sz(int nr_entry) |
---|
201 | 208 | { |
---|
202 | 209 | /* size of a fifo is determined by the number of entries it contains */ |
---|
203 | | - return (nr_entry * sizeof(u64)) + FIFOHANDLESIZE; |
---|
| 210 | + return nr_entry * sizeof(u64) + FIFOHANDLESIZE; |
---|
204 | 211 | } |
---|
205 | 212 | |
---|
206 | 213 | static void fifo_setup(void *base_addr, int nr_entry) |
---|
.. | .. |
---|
249 | 256 | memset_io(device_ccb, 0, sizeof(struct ccb)); |
---|
250 | 257 | |
---|
251 | 258 | /* free resources used to back send/recv queues */ |
---|
252 | | - pci_free_consistent(pdev, data->dma_size, data->dma_va, data->dma_pa); |
---|
| 259 | + dma_free_coherent(&pdev->dev, data->dma_size, data->dma_va, |
---|
| 260 | + data->dma_pa); |
---|
253 | 261 | } |
---|
254 | 262 | |
---|
255 | 263 | static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot) |
---|
.. | .. |
---|
265 | 273 | 2 * desc_mem_sz(NR_QENTRY) + |
---|
266 | 274 | ILO_START_ALIGN + ILO_CACHE_SZ; |
---|
267 | 275 | |
---|
268 | | - data->dma_va = pci_alloc_consistent(hw->ilo_dev, data->dma_size, |
---|
269 | | - &data->dma_pa); |
---|
| 276 | + data->dma_va = dma_alloc_coherent(&hw->ilo_dev->dev, data->dma_size, |
---|
| 277 | + &data->dma_pa, GFP_ATOMIC); |
---|
270 | 278 | if (!data->dma_va) |
---|
271 | 279 | return -ENOMEM; |
---|
272 | 280 | |
---|
273 | 281 | dma_va = (char *)data->dma_va; |
---|
274 | 282 | dma_pa = data->dma_pa; |
---|
275 | | - |
---|
276 | | - memset(dma_va, 0, data->dma_size); |
---|
277 | 283 | |
---|
278 | 284 | dma_va = (char *)roundup((unsigned long)dma_va, ILO_START_ALIGN); |
---|
279 | 285 | dma_pa = roundup(dma_pa, ILO_START_ALIGN); |
---|
.. | .. |
---|
763 | 769 | int devnum, minor, start, error = 0; |
---|
764 | 770 | struct ilo_hwinfo *ilo_hw; |
---|
765 | 771 | |
---|
766 | | - /* Ignore subsystem_device = 0x1979 (set by BIOS) */ |
---|
767 | | - if (pdev->subsystem_device == 0x1979) |
---|
768 | | - return 0; |
---|
| 772 | + if (pci_match_id(ilo_blacklist, pdev)) { |
---|
| 773 | + dev_dbg(&pdev->dev, "Not supported on this device\n"); |
---|
| 774 | + return -ENODEV; |
---|
| 775 | + } |
---|
769 | 776 | |
---|
770 | 777 | if (max_ccb > MAX_CCB) |
---|
771 | 778 | max_ccb = MAX_CCB; |
---|