1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

Merge branch 'internal'

This commit is contained in:
internal 2022-06-07 18:11:35 +02:00
commit ab4b0c8306
3 changed files with 17 additions and 9 deletions

View File

@ -283,11 +283,17 @@ static int __devinit ddb_probe(struct pci_dev *pdev,
pci_set_master(pdev); pci_set_master(pdev);
#if (KERNEL_VERSION(5, 18, 0) <= LINUX_VERSION_CODE)
if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)))
if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)))
#else
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
} else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
} else return -ENODEV; } else
#endif
return -ENODEV;
dev = vzalloc(sizeof(*dev)); dev = vzalloc(sizeof(*dev));
if (!dev) if (!dev)
@ -333,7 +339,7 @@ static int __devinit ddb_probe(struct pci_dev *pdev,
u32 min = dev->link[0].info->hw_min; u32 min = dev->link[0].info->hw_min;
dev_err(dev->dev, "Update firmware to at least version %u.%u to ensure full functionality!\n", dev_err(dev->dev, "Update firmware to at least version %u.%u to ensure full functionality!\n",
(min & 0xff0000) >> 16, min & 0xffff); (min & 0xff0000) >> 16, min & 0xffff);
} }
if (dev->link[0].info->ns_num) { if (dev->link[0].info->ns_num) {
@ -344,14 +350,14 @@ static int __devinit ddb_probe(struct pci_dev *pdev,
if (dev->link[0].info->type != DDB_MOD) if (dev->link[0].info->type != DDB_MOD)
ddbwritel(dev, 0, DMA_BASE_WRITE); ddbwritel(dev, 0, DMA_BASE_WRITE);
if (dev->link[0].info->type == DDB_MOD if (dev->link[0].info->type == DDB_MOD &&
&& dev->link[0].info->version <= 1) { dev->link[0].info->version <= 1) {
if (ddbreadl(dev, 0x1c) == 4) if (ddbreadl(dev, 0x1c) == 4)
dev->link[0].info = dev->link[0].info =
get_ddb_info(0xdd01, 0x0201, 0xdd01, 0x0004); get_ddb_info(0xdd01, 0x0201, 0xdd01, 0x0004);
} }
if (dev->link[0].info->type == DDB_MOD if (dev->link[0].info->type == DDB_MOD &&
&& dev->link[0].info->version == 2) { dev->link[0].info->version == 2) {
u32 lic = ddbreadl(dev, 0x1c) & 7; u32 lic = ddbreadl(dev, 0x1c) & 7;
if (dev->link[0].ids.revision == 1) if (dev->link[0].ids.revision == 1)
@ -452,7 +458,6 @@ static const struct pci_device_id ddb_id_table[] __devinitconst = {
}; };
MODULE_DEVICE_TABLE(pci, ddb_id_table); MODULE_DEVICE_TABLE(pci, ddb_id_table);
static pci_ers_result_t ddb_pci_slot_reset(struct pci_dev *dev) static pci_ers_result_t ddb_pci_slot_reset(struct pci_dev *dev)
{ {
pr_info("pci_slot_reset\n"); pr_info("pci_slot_reset\n");
@ -492,7 +497,6 @@ static const struct pci_error_handlers ddb_error = {
.resume = ddb_pci_resume, .resume = ddb_pci_resume,
}; };
static struct pci_driver ddb_pci_driver = { static struct pci_driver ddb_pci_driver = {
.name = "ddbridge", .name = "ddbridge",
.id_table = ddb_id_table, .id_table = ddb_id_table,

View File

@ -1787,7 +1787,8 @@ int ddbridge_mod_do_ioctl(struct file *file, unsigned int cmd, void *parg)
(struct dtv_properties __user *) parg; (struct dtv_properties __user *) parg;
int i, ret = 0; int i, ret = 0;
if (dev->link[0].info->version >= 16 && cmd != FE_SET_PROPERTY) if (dev->link[0].info->version >= 16 &&
(cmd != FE_SET_PROPERTY && cmd != IOCTL_DDB_MCI_CMD))
return -EINVAL; return -EINVAL;
mutex_lock(&dev->ioctl_mutex); mutex_lock(&dev->ioctl_mutex);
switch (cmd) { switch (cmd) {

View File

@ -479,6 +479,9 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len,
u32 *buffer_flags) u32 *buffer_flags)
{ {
struct dmxdev_filter *dmxdevfilter = feed->priv; struct dmxdev_filter *dmxdevfilter = feed->priv;
#ifdef CONFIG_DVB_MMAP
struct dvb_vb2_ctx *ctx;
#endif
struct dvb_ringbuffer *buffer; struct dvb_ringbuffer *buffer;
int ret; int ret;