Changeset 732
- Timestamp:
- Sep 11, 2022, 3:09:04 AM (3 years ago)
- Location:
- GPL/branches/uniaud32-next
- Files:
-
- 7 edited
-
alsa-kernel/core/control.c (modified) (1 diff)
-
alsa-kernel/core/init.c (modified) (1 diff)
-
alsa-kernel/pci/ens1370.c (modified) (2 diffs)
-
alsa-kernel/pci/hda/hda_intel.c (modified) (1 diff)
-
alsa-kernel/pci/maestro3.c (modified) (3 diffs)
-
include/linux/pci.h (modified) (4 diffs)
-
lib32/pci.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/alsa-kernel/core/control.c
r725 r732 1433 1433 size_t buf_len, name_len; 1434 1434 unsigned int i; 1435 // const 1436 uintptr_t user_ptrval = ue->info.value.enumerated.names_ptr; 1435 const uintptr_t user_ptrval = ue->info.value.enumerated.names_ptr; 1437 1436 1438 1437 buf_len = ue->info.value.enumerated.names_length; -
GPL/branches/uniaud32-next/alsa-kernel/core/init.c
r716 r732 239 239 return err; 240 240 } 241 241 242 devres_add(parent, card); 242 243 243 *card_ret = card; 244 244 return 0; -
GPL/branches/uniaud32-next/alsa-kernel/pci/ens1370.c
r720 r732 2043 2043 return err; 2044 2044 ensoniq->port = pci_resource_start(pci, 0); 2045 #ifndef TARGET_OS22046 2045 if (devm_request_irq(&pci->dev, pci->irq, snd_audiopci_interrupt, 2047 2046 IRQF_SHARED, KBUILD_MODNAME, ensoniq)) { … … 2049 2048 return -EBUSY; 2050 2049 } 2051 #else2052 if (request_irq(pci->irq, snd_audiopci_interrupt, IRQF_SHARED,2053 KBUILD_MODNAME, ensoniq)) {2054 dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);2055 snd_ensoniq_free(card);2056 return -EBUSY;2057 }2058 #endif2059 2050 ensoniq->irq = pci->irq; 2060 2051 card->sync_irq = ensoniq->irq; -
GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_intel.c
r711 r732 1802 1802 *rchip = NULL; 1803 1803 1804 err = pci _enable_device(pci);1804 err = pcim_enable_device(pci); 1805 1805 if (err < 0) 1806 1806 return err; 1807 1807 1808 #ifndef TARGET_OS21809 1808 hda = devm_kzalloc(&pci->dev, sizeof(*hda), GFP_KERNEL); 1810 #else1811 hda = kzalloc(sizeof(*hda), GFP_KERNEL);1812 #endif1813 1809 if (!hda) 1814 1810 return -ENOMEM; -
GPL/branches/uniaud32-next/alsa-kernel/pci/maestro3.c
r711 r732 2565 2565 2566 2566 chip->num_substreams = NR_DSPS; 2567 #ifndef TARGET_OS22568 2567 chip->substreams = devm_kcalloc(&pci->dev, chip->num_substreams, 2569 2568 sizeof(struct m3_dma), GFP_KERNEL); 2570 #else2571 chip->substreams = kcalloc(chip->num_substreams, sizeof(struct m3_dma),2572 GFP_KERNEL);2573 #endif2574 2569 if (!chip->substreams) 2575 2570 return -ENOMEM; … … 2603 2598 snd_m3_hv_init(chip); 2604 2599 2605 #ifndef TARGET_OS22606 2600 if (devm_request_irq(&pci->dev, pci->irq, snd_m3_interrupt, IRQF_SHARED, 2607 2601 KBUILD_MODNAME, chip)) { … … 2609 2603 return -ENOMEM; 2610 2604 } 2611 #else2612 if (request_irq(pci->irq, snd_m3_interrupt, IRQF_SHARED,2613 KBUILD_MODNAME, chip)) {2614 dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);2615 return -ENOMEM;2616 }2617 #endif2618 2605 chip->irq = pci->irq; 2619 2606 card->sync_irq = chip->irq; -
GPL/branches/uniaud32-next/include/linux/pci.h
r730 r732 43 43 #define PCI_COMMAND_SERR 0x100 /* Enable SERR */ 44 44 #define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ 45 #define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */ 45 46 46 47 #define PCI_STATUS 0x06 /* 16 bits */ … … 363 364 struct resource dma_resource[DEVICE_COUNT_DMA]; 364 365 struct resource irq_resource[DEVICE_COUNT_IRQ]; 366 unsigned int is_managed:1; 365 367 366 368 char name[48]; /* Device name */ … … 692 694 } 693 695 694 /* pci_intx() wrapper */695 #define pci_intx(pci,x)696 697 696 /* MSI */ 698 697 extern int snd_pci_enable_msi(struct pci_dev *dev); … … 784 783 #define pcim_iomap pci_iomap 785 784 int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name); 785 786 static inline int pci_is_managed(struct pci_dev *pdev) 787 { 788 return pdev->is_managed; 789 } 790 void pci_intx(struct pci_dev *pdev, int enable); 791 786 792 #endif /* LINUX_PCI_H */ -
GPL/branches/uniaud32-next/lib32/pci.c
r730 r732 1156 1156 } 1157 1157 EXPORT_SYMBOL(__devm_request_region); 1158 1159 /* 1160 * Managed PCI resources. This manages device on/off, INTx/MSI/MSI-X 1161 * on/off and BAR regions. pci_dev itself records MSI/MSI-X status, so 1162 * there's no need to track it separately. pci_devres is initialized 1163 * when a device is enabled using managed PCI device enable interface. 1164 */ 1165 struct pci_devres { 1166 unsigned int enabled:1; 1167 unsigned int pinned:1; 1168 unsigned int orig_intx:1; 1169 unsigned int restore_intx:1; 1170 unsigned int mwi:1; 1171 u32 region_mask; 1172 }; 1173 1174 static void pcim_release(struct device *gendev, void *res) 1175 { 1176 } 1177 1178 static struct pci_devres *find_pci_dr(struct pci_dev *pdev) 1179 { 1180 if (pci_is_managed(pdev)) 1181 return devres_find(&pdev->dev, pcim_release, NULL, NULL); 1182 return NULL; 1183 } 1184 1185 /** 1186 * pci_intx - enables/disables PCI INTx for device dev 1187 * @pdev: the PCI device to operate on 1188 * @enable: boolean: whether to enable or disable PCI INTx 1189 * 1190 * Enables/disables PCI INTx for device @pdev 1191 */ 1192 void pci_intx(struct pci_dev *pdev, int enable) 1193 { 1194 u16 pci_command, new; 1195 1196 pci_read_config_word(pdev, PCI_COMMAND, &pci_command); 1197 1198 if (enable) 1199 new = pci_command & ~PCI_COMMAND_INTX_DISABLE; 1200 else 1201 new = pci_command | PCI_COMMAND_INTX_DISABLE; 1202 1203 if (new != pci_command) { 1204 struct pci_devres *dr; 1205 1206 pci_write_config_word(pdev, PCI_COMMAND, new); 1207 1208 dr = find_pci_dr(pdev); 1209 if (dr && !dr->restore_intx) { 1210 dr->restore_intx = 1; 1211 dr->orig_intx = !enable; 1212 } 1213 } 1214 } 1215 EXPORT_SYMBOL_GPL(pci_intx);
Note:
See TracChangeset
for help on using the changeset viewer.
