Re: [PATCH v3 net-next 1/2] net: ethernet: slicoss: add slicoss gigabit ethernet driver
Hi Rami, On 26.11.2016 16:48, Rami Rosen wrote: >> @@ -0,0 +1,28 @@ >> +config NET_VENDOR_ALACRITECH >> +bool "Alacritech devices" >> +default y >> +---help--- >> + If you have a network (Ethernet) card belonging to this class, >> say Y. >> + >> + Note that the answer to this question doesn't directly affect the >> + kernel: saying N will just cause the configurator to skip all > > Shouldn't it be "Alacritech devices" here, as appears earlier ? > >> + the questions about Renesas devices. If you say Y, you will be >> asked Yes, it definitely should not be Renesas :). This is a stupid copy and paste error, I will fix it, thank you! >> + for your specific device in the following questions. >> + > > ... > ... > ... >> +struct slic_device { >> + struct pci_dev *pdev; > ... >> + bool promisc; > > Seems that the autoneg boolean is not used anywhere, apart from > setting it once to true in > the slic_set_link_autoneg() method. Apart from this member it is not > accessed anywhere, so it seems it should be removed. > >> + bool autoneg; >> + int speed; Agreed, this variable can be removed. > ... > >> +static int slic_load_rcvseq_firmware(struct slic_device *sdev) >> +{ >> + const struct firmware *fw; >> + const char *file; >> + u32 codelen; >> + int idx = 0; >> + u32 instr; >> + u32 addr; >> + int err; >> + > ... >> + /* Do an initial sanity check concerning firmware size now. A further >> +* check follows below. >> +*/ >> + if (fw->size < SLIC_FIRMWARE_MIN_SIZE) { >> + dev_err(>pdev->dev, >> + "invalid firmware size %zu (min %u expected)\n", >> + fw->size, SLIC_FIRMWARE_MIN_SIZE); >> + err = -EINVAL; > > in the release label, always 0 is returned: > >> + goto release; >> + } >> + >> + codelen = slic_read_dword_from_firmware(fw, ); >> + >> + /* do another sanity check against firmware size */ >> + if ((codelen + 4) > fw->size) { >> + dev_err(>pdev->dev, >> + "invalid rcv-sequencer firmware size %zu\n", >> fw->size); >> + err = -EINVAL; > > Again, in the release label, always 0 is returned: > >> + goto release; >> + } >> + >> >> +release: >> + release_firmware(fw); >> + >> + return 0; >> +} This should return "err", I will fix it. Thanks a lot for the review! Regards, Lino ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: greybuis: fix permission style warnings
On Sat, 2016-11-26 at 22:50 +0100, Andrea Ghittino wrote: > Fixes greybus user/groups permission style warnings > found by checkpatch.pl tool > > Signed-off-by: Andrea Ghittino > --- > diff --git a/drivers/staging/greybus/camera.c > b/drivers/staging/greybus/camera.c > index 1c5b41a..4424f63 100644 > --- a/drivers/staging/greybus/camera.c > +++ b/drivers/staging/greybus/camera.c > @@ -1067,22 +1067,22 @@ struct gb_camera_debugfs_entry { > static const struct gb_camera_debugfs_entry > gb_camera_debugfs_entries[] = { > { > .name = "capabilities", > - .mask = S_IFREG | S_IRUGO, > + .mask = S_IFREG | 0444, I think the descriptive text makes way more sense than the magic number, especially moreso than the 80 character limit. --- bod ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/22] staging/lustre/libcfs: Convert to hotplug state machine
From: Anna-Maria GleixnerInstall the callbacks via the state machine. Cc: Oleg Drokin Cc: Andreas Dilger Cc: James Simmons Cc: Greg Kroah-Hartman Cc: lustre-de...@lists.lustre.org Cc: de...@driverdev.osuosl.org Signed-off-by: Anna-Maria Gleixner Signed-off-by: Sebastian Andrzej Siewior --- .../staging/lustre/lnet/libcfs/linux/linux-cpu.c | 89 -- include/linux/cpuhotplug.h | 1 + 2 files changed, 50 insertions(+), 40 deletions(-) diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c index e8b1a61420de..a75113ab2903 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c @@ -73,6 +73,9 @@ struct cfs_cpt_data { }; static struct cfs_cpt_data cpt_data; +#ifdef CONFIG_HOTPLUG_CPU +static enum cpuhp_state lustre_cpu_online; +#endif static void cfs_node_to_cpumask(int node, cpumask_t *mask) @@ -942,48 +945,38 @@ cfs_cpt_table_create_pattern(char *pattern) } #ifdef CONFIG_HOTPLUG_CPU -static int -cfs_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) + +static void cfs_cpu_incr_cpt_version(void) { - unsigned int cpu = (unsigned long)hcpu; - bool warn; - - switch (action) { - case CPU_DEAD: - case CPU_DEAD_FROZEN: - case CPU_ONLINE: - case CPU_ONLINE_FROZEN: - spin_lock(_data.cpt_lock); - cpt_data.cpt_version++; - spin_unlock(_data.cpt_lock); - /* Fall through */ - default: - if (action != CPU_DEAD && action != CPU_DEAD_FROZEN) { - CDEBUG(D_INFO, "CPU changed [cpu %u action %lx]\n", - cpu, action); - break; - } - - mutex_lock(_data.cpt_mutex); - /* if all HTs in a core are offline, it may break affinity */ - cpumask_copy(cpt_data.cpt_cpumask, -topology_sibling_cpumask(cpu)); - warn = cpumask_any_and(cpt_data.cpt_cpumask, - cpu_online_mask) >= nr_cpu_ids; - mutex_unlock(_data.cpt_mutex); - CDEBUG(warn ? D_WARNING : D_INFO, - "Lustre: can't support CPU plug-out well now, performance and stability could be impacted [CPU %u action: %lx]\n", - cpu, action); - } - - return NOTIFY_OK; + spin_lock(_data.cpt_lock); + cpt_data.cpt_version++; + spin_unlock(_data.cpt_lock); } -static struct notifier_block cfs_cpu_notifier = { - .notifier_call = cfs_cpu_notify, - .priority = 0 -}; +static int cfs_cpu_online(unsigned int cpu) +{ + cfs_cpu_incr_cpt_version(); + return 0; +} +static int cfs_cpu_dead(unsigned int cpu) +{ + bool warn; + int next; + + cfs_cpu_incr_cpt_version(); + + mutex_lock(_data.cpt_mutex); + /* if all HTs in a core are offline, it may break affinity */ + cpumask_copy(cpt_data.cpt_cpumask, topology_sibling_cpumask(cpu)); + next = cpumask_any_and(cpt_data.cpt_cpumask, cpu_online_mask); + warn = next >= nr_cpu_ids; + mutex_unlock(_data.cpt_mutex); + CDEBUG(warn ? D_WARNING : D_INFO, + "Lustre: can't support CPU plug-out well now, performance and stability could be impacted [CPU %u]\n", + cpu); + return 0; +} #endif void @@ -993,7 +986,9 @@ cfs_cpu_fini(void) cfs_cpt_table_free(cfs_cpt_table); #ifdef CONFIG_HOTPLUG_CPU - unregister_hotcpu_notifier(_cpu_notifier); + if (lustre_cpu_online) + cpuhp_remove_state_nocalls(lustre_cpu_online); + cpuhp_remove_state_nocalls(CPUHP_LUSTRE_CFS_DEAD); #endif if (cpt_data.cpt_cpumask) LIBCFS_FREE(cpt_data.cpt_cpumask, cpumask_size()); @@ -1002,6 +997,10 @@ cfs_cpu_fini(void) int cfs_cpu_init(void) { +#ifdef CONFIG_HOTPLUG_CPU + int ret; +#endif + LASSERT(!cfs_cpt_table); memset(_data, 0, sizeof(cpt_data)); @@ -1016,7 +1015,17 @@ cfs_cpu_init(void) mutex_init(_data.cpt_mutex); #ifdef CONFIG_HOTPLUG_CPU - register_hotcpu_notifier(_cpu_notifier); + ret = cpuhp_setup_state_nocalls(CPUHP_LUSTRE_CFS_DEAD, + "staging/lustre/cfe:dead", NULL, + cfs_cpu_dead); + if (ret < 0) + goto failed; + ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, + "staging/lustre/cfe:online", + cfs_cpu_online, NULL); + if (ret < 0) +
[PATCH v3] Staging: iio: adc: fix sysfs files modes in ad7192.c
Fixes warnings found by checkpatch.pl: - sysfs entries user/group modes to use their octal representation - use the IIO_DEVICE_ATTR_[RO|RW] macroses - coding style Signed-off-by: Boyan Vladinov--- drivers/staging/iio/adc/ad7192.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c index 1fb68c01abd5..29b8a291fb6a 100644 --- a/drivers/staging/iio/adc/ad7192.c +++ b/drivers/staging/iio/adc/ad7192.c @@ -340,15 +340,21 @@ ad7192_show_scale_available(struct device *dev, return len; } +static ssize_t +in_voltage_scale_available_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + return ad7192_show_scale_available(dev, attr, buf); +} + static IIO_DEVICE_ATTR_NAMED(in_v_m_v_scale_available, in_voltage-voltage_scale_available, -S_IRUGO, ad7192_show_scale_available, NULL, 0); +0444, ad7192_show_scale_available, NULL, 0); -static IIO_DEVICE_ATTR(in_voltage_scale_available, S_IRUGO, - ad7192_show_scale_available, NULL, 0); +static IIO_DEVICE_ATTR_RO(in_voltage_scale_available, 0); -static ssize_t ad7192_show_ac_excitation(struct device *dev, -struct device_attribute *attr, +static ssize_t ac_excitation_en_show(struct device *dev, +struct device_attribute *attr, char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -357,8 +363,8 @@ static ssize_t ad7192_show_ac_excitation(struct device *dev, return sprintf(buf, "%d\n", !!(st->mode & AD7192_MODE_ACX)); } -static ssize_t ad7192_show_bridge_switch(struct device *dev, -struct device_attribute *attr, +static ssize_t bridge_switch_en_show(struct device *dev, +struct device_attribute *attr, char *buf) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -367,8 +373,8 @@ static ssize_t ad7192_show_bridge_switch(struct device *dev, return sprintf(buf, "%d\n", !!(st->gpocon & AD7192_GPOCON_BPDSW)); } -static ssize_t ad7192_set(struct device *dev, - struct device_attribute *attr, +static ssize_t bridge_switch_en_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t len) { @@ -412,13 +418,16 @@ static ssize_t ad7192_set(struct device *dev, return ret ? ret : len; } -static IIO_DEVICE_ATTR(bridge_switch_en, S_IRUGO | S_IWUSR, - ad7192_show_bridge_switch, ad7192_set, - AD7192_REG_GPOCON); +static ssize_t ac_excitation_en_store(struct device *dev, + struct device_attribute *attr, +const char *buf, size_t len) +{ + return bridge_switch_en_store(dev, attr, buf, len); +} + +static IIO_DEVICE_ATTR_RW(bridge_switch_en, AD7192_REG_GPOCON); -static IIO_DEVICE_ATTR(ac_excitation_en, S_IRUGO | S_IWUSR, - ad7192_show_ac_excitation, ad7192_set, - AD7192_REG_MODE); +static IIO_DEVICE_ATTR_RW(ac_excitation_en, AD7192_REG_MODE); static struct attribute *ad7192_attributes[] = { _dev_attr_in_v_m_v_scale_available.dev_attr.attr, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: greybuis: fix line over 80 characters style warnings
Fixes greybus "line over 80 characters" style warnings found by checkpatch.pl tool Signed-off-by: Andrea Ghittino --- diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c index 3fda0cd..755120a 100644 --- a/drivers/staging/greybus/arche-apb-ctrl.c +++ b/drivers/staging/greybus/arche-apb-ctrl.c @@ -168,7 +168,10 @@ static int standby_boot_seq(struct platform_device *pdev) if (apb->init_disabled) return 0; - /* Even if it is in OFF state, then we do not want to change the state */ + /* +* Even if it is in OFF state, +* then we do not want to change the state +*/ if (apb->state == ARCHE_PLATFORM_STATE_STANDBY || apb->state == ARCHE_PLATFORM_STATE_OFF) return 0; diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index 338c2d3..594fe01 100644 --- a/drivers/staging/greybus/arche-platform.c +++ b/drivers/staging/greybus/arche-platform.c @@ -291,15 +291,21 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid) if (arche_pdata->wake_detect_state == WD_STATE_BOOT_INIT) { if (time_before(jiffies, arche_pdata->wake_detect_start + - msecs_to_jiffies(WD_COLDBOOT_PULSE_WIDTH_MS))) { - arche_platform_set_wake_detect_state(arche_pdata, - WD_STATE_IDLE); + msecs_to_jiffies( + WD_COLDBOOT_PULSE_WIDTH_MS))) { + arche_platform_set_wake_detect_state( + arche_pdata, + WD_STATE_IDLE); } else { - /* Check we are not in middle of irq thread already */ + /* +* Check we are not in middle +* of irq thread already +*/ if (arche_pdata->wake_detect_state != WD_STATE_COLDBOOT_START) { - arche_platform_set_wake_detect_state(arche_pdata, - WD_STATE_COLDBOOT_TRIG); + arche_platform_set_wake_detect_state( + arche_pdata, + WD_STATE_COLDBOOT_TRIG); spin_unlock_irqrestore( _pdata->wake_lock, flags); @@ -312,12 +318,14 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid) if (arche_pdata->wake_detect_state == WD_STATE_IDLE) { arche_pdata->wake_detect_start = jiffies; /* -* In the begining, when wake/detect goes low (first time), we assume -* it is meant for coldboot and set the flag. If wake/detect line stays low -* beyond 30msec, then it is coldboot else fallback to standby boot. +* In the begining, when wake/detect goes low +* (first time), we assume it is meant for coldboot +* and set the flag. If wake/detect line stays low +* beyond 30msec, then it is coldboot else +* fallback to standby boot. */ arche_platform_set_wake_detect_state(arche_pdata, - WD_STATE_BOOT_INIT); + WD_STATE_BOOT_INIT); } } @@ -330,7 +338,8 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid) /* * Requires arche_pdata->platform_state_mutex to be held */ -static int arche_platform_coldboot_seq(struct arche_platform_drvdata *arche_pdata) +static int arche_platform_coldboot_seq( + struct arche_platform_drvdata *arche_pdata) { int ret; @@ -364,7 +373,8 @@ static int arche_platform_coldboot_seq(struct arche_platform_drvdata *arche_pdat /* * Requires arche_pdata->platform_state_mutex to be held */ -static int arche_platform_fw_flashing_seq(struct arche_platform_drvdata *arche_pdata) +static int arche_platform_fw_flashing_seq( + struct arche_platform_drvdata *arche_pdata) { int ret; @@ -398,7
[PATCH] staging: greybuis: fix permission style warnings
Fixes greybus user/groups permission style warnings found by checkpatch.pl tool Signed-off-by: Andrea Ghittino --- diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index 1c5b41a..4424f63 100644 --- a/drivers/staging/greybus/camera.c +++ b/drivers/staging/greybus/camera.c @@ -1067,22 +1067,22 @@ struct gb_camera_debugfs_entry { static const struct gb_camera_debugfs_entry gb_camera_debugfs_entries[] = { { .name = "capabilities", - .mask = S_IFREG | S_IRUGO, + .mask = S_IFREG | 0444, .buffer = GB_CAMERA_DEBUGFS_BUFFER_CAPABILITIES, .execute = gb_camera_debugfs_capabilities, }, { .name = "configure_streams", - .mask = S_IFREG | S_IRUGO | S_IWUGO, + .mask = S_IFREG | 0666, .buffer = GB_CAMERA_DEBUGFS_BUFFER_STREAMS, .execute = gb_camera_debugfs_configure_streams, }, { .name = "capture", - .mask = S_IFREG | S_IRUGO | S_IWUGO, + .mask = S_IFREG | 0666, .buffer = GB_CAMERA_DEBUGFS_BUFFER_CAPTURE, .execute = gb_camera_debugfs_capture, }, { .name = "flush", - .mask = S_IFREG | S_IRUGO | S_IWUGO, + .mask = S_IFREG | 0666, .buffer = GB_CAMERA_DEBUGFS_BUFFER_FLUSH, .execute = gb_camera_debugfs_flush, }, @@ -1097,7 +1097,7 @@ static ssize_t gb_camera_debugfs_read(struct file *file, char __user *buf, ssize_t ret; /* For read-only entries the operation is triggered by a read. */ - if (!(op->mask & S_IWUGO)) { + if (!(op->mask & 0222)) { ret = op->execute(gcam, NULL, 0); if (ret < 0) return ret; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] rtlwifi: Fix enter/exit power_save
In commit a5ffbe0a1993 ("rtlwifi: Fix scheduling while atomic bug") and commit a269913c52ad ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue"), an error was introduced in the power-save routines due to the fact that leaving PS was delayed by the use of a work queue. This problem is fixed by detecting if the enter or leave routines are in interrupt mode. If so, the workqueue is used to place the request. If in normal mode, the enter or leave routines are called directly. Fixes: a269913c52ad ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue") Reported-by: Ping-Ke ShihSigned-off-by: Larry Finger Cc: Stable --- Kalle, Please push this patch to 4.10. It fixes a long-standing bug. Thanks, Larry --- drivers/net/wireless/realtek/rtlwifi/base.c | 8 +++ drivers/net/wireless/realtek/rtlwifi/core.c | 9 +++- drivers/net/wireless/realtek/rtlwifi/pci.c | 14 --- drivers/net/wireless/realtek/rtlwifi/ps.c | 36 ++--- 4 files changed, 40 insertions(+), 27 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c index 264466f..4ac928b 100644 --- a/drivers/net/wireless/realtek/rtlwifi/base.c +++ b/drivers/net/wireless/realtek/rtlwifi/base.c @@ -1303,12 +1303,13 @@ EXPORT_SYMBOL_GPL(rtl_action_proc); static void setup_arp_tx(struct rtl_priv *rtlpriv, struct rtl_ps_ctl *ppsc) { + struct ieee80211_hw *hw = rtlpriv->hw; + rtlpriv->ra.is_special_data = true; if (rtlpriv->cfg->ops->get_btc_status()) rtlpriv->btcoexist.btc_ops->btc_special_packet_notify( rtlpriv, 1); - rtlpriv->enter_ps = false; - schedule_work(>works.lps_change_work); + rtl_lps_leave(hw); ppsc->last_delaylps_stamp_jiffies = jiffies; } @@ -1381,8 +1382,7 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx, if (is_tx) { rtlpriv->ra.is_special_data = true; - rtlpriv->enter_ps = false; - schedule_work(>works.lps_change_work); + rtl_lps_leave(hw); ppsc->last_delaylps_stamp_jiffies = jiffies; } diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c index e89681d..2caa4ad 100644 --- a/drivers/net/wireless/realtek/rtlwifi/core.c +++ b/drivers/net/wireless/realtek/rtlwifi/core.c @@ -1150,10 +1150,8 @@ static void rtl_op_bss_info_changed(struct ieee80211_hw *hw, } else { mstatus = RT_MEDIA_DISCONNECT; - if (mac->link_state == MAC80211_LINKED) { - rtlpriv->enter_ps = false; - schedule_work(>works.lps_change_work); - } + if (mac->link_state == MAC80211_LINKED) + rtl_lps_leave(hw); if (ppsc->p2p_ps_info.p2p_ps_mode > P2P_PS_NONE) rtl_p2p_ps_cmd(hw, P2P_PS_DISABLE); mac->link_state = MAC80211_NOLINK; @@ -1431,8 +1429,7 @@ static void rtl_op_sw_scan_start(struct ieee80211_hw *hw, } if (mac->link_state == MAC80211_LINKED) { - rtlpriv->enter_ps = false; - schedule_work(>works.lps_change_work); + rtl_lps_leave(hw); mac->link_state = MAC80211_LINKED_SCANNING; } else { rtl_ips_nic_on(hw); diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c index d044b23..8bfe020 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.c +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c @@ -659,11 +659,9 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio) } if (((rtlpriv->link_info.num_rx_inperiod + - rtlpriv->link_info.num_tx_inperiod) > 8) || - (rtlpriv->link_info.num_rx_inperiod > 2)) { - rtlpriv->enter_ps = false; - schedule_work(>works.lps_change_work); - } + rtlpriv->link_info.num_tx_inperiod) > 8) || + (rtlpriv->link_info.num_rx_inperiod > 2)) + rtl_lps_leave(hw); } static int _rtl_pci_init_one_rxdesc(struct ieee80211_hw *hw, @@ -914,10 +912,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) } if (((rtlpriv->link_info.num_rx_inperiod + rtlpriv->link_info.num_tx_inperiod) > 8) || - (rtlpriv->link_info.num_rx_inperiod > 2)) { - rtlpriv->enter_ps = false; - schedule_work(>works.lps_change_work); - } +
[PATCH]: Staging: rtl8192e: Block comments use a trailing */ on a separate line
This patch fixes the following checkpath.pl warning WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Rahul Krishnan--- drivers/staging/rtl8192e/rtllib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index b895a53..f6a9aea 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -619,7 +619,8 @@ struct ieee_ibss_seq { /* NOTE: This data is for statistical purposes; not all hardware provides this * information for frames received. Not setting these will not cause - * any adverse affects. */ + * any adverse affects. + */ struct rtllib_rx_stats { u64 mac_time; s8 rssi; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 net-next 2/2] MAINTAINERS: add entry for slicoss ethernet driver
Add myself as maintainer for the slicoss ethernet driver. Signed-off-by: Lino Sanfilippo--- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6781a3f..bb9af28 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -562,6 +562,11 @@ T: git git://linuxtv.org/anttip/media_tree.git S: Maintained F: drivers/media/usb/airspy/ +ALACRITECH GIGABIT ETHERNET DRIVER +M: Lino Sanfilippo +S: Maintained +F: drivers/net/ethernet/alacritech/* + ALCATEL SPEEDTOUCH USB DRIVER M: Duncan Sands L: linux-...@vger.kernel.org -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 net-next 1/2] net: ethernet: slicoss: add slicoss gigabit ethernet driver
Add driver for Alacritech gigabit ethernet cards with SLIC (session-layer interface control) technology. The driver provides basic support without SLIC for the following devices: - Mojave cards (single port PCI Gigabit) both copper and fiber - Oasis cards (single and dual port PCI-x Gigabit) copper and fiber - Kalahari cards (dual and quad port PCI-e Gigabit) copper and fiber Signed-off-by: Lino Sanfilippo--- drivers/net/ethernet/Kconfig |1 + drivers/net/ethernet/Makefile |1 + drivers/net/ethernet/alacritech/Kconfig | 28 + drivers/net/ethernet/alacritech/Makefile |4 + drivers/net/ethernet/alacritech/slic.h| 576 + drivers/net/ethernet/alacritech/slicoss.c | 1867 + 6 files changed, 2477 insertions(+) create mode 100644 drivers/net/ethernet/alacritech/Kconfig create mode 100644 drivers/net/ethernet/alacritech/Makefile create mode 100644 drivers/net/ethernet/alacritech/slic.h create mode 100644 drivers/net/ethernet/alacritech/slicoss.c diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig index 2ffd634..a4cc87fe 100644 --- a/drivers/net/ethernet/Kconfig +++ b/drivers/net/ethernet/Kconfig @@ -21,6 +21,7 @@ source "drivers/net/ethernet/3com/Kconfig" source "drivers/net/ethernet/adaptec/Kconfig" source "drivers/net/ethernet/aeroflex/Kconfig" source "drivers/net/ethernet/agere/Kconfig" +source "drivers/net/ethernet/alacritech/Kconfig" source "drivers/net/ethernet/allwinner/Kconfig" source "drivers/net/ethernet/alteon/Kconfig" source "drivers/net/ethernet/altera/Kconfig" diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile index 1d349e9..b448027 100644 --- a/drivers/net/ethernet/Makefile +++ b/drivers/net/ethernet/Makefile @@ -7,6 +7,7 @@ obj-$(CONFIG_NET_VENDOR_8390) += 8390/ obj-$(CONFIG_NET_VENDOR_ADAPTEC) += adaptec/ obj-$(CONFIG_GRETH) += aeroflex/ obj-$(CONFIG_NET_VENDOR_AGERE) += agere/ +obj-$(CONFIG_NET_VENDOR_ALACRITECH) += alacritech/ obj-$(CONFIG_NET_VENDOR_ALLWINNER) += allwinner/ obj-$(CONFIG_NET_VENDOR_ALTEON) += alteon/ obj-$(CONFIG_ALTERA_TSE) += altera/ diff --git a/drivers/net/ethernet/alacritech/Kconfig b/drivers/net/ethernet/alacritech/Kconfig new file mode 100644 index 000..41000a3 --- /dev/null +++ b/drivers/net/ethernet/alacritech/Kconfig @@ -0,0 +1,28 @@ +config NET_VENDOR_ALACRITECH +bool "Alacritech devices" +default y +---help--- + If you have a network (Ethernet) card belonging to this class, say Y. + + Note that the answer to this question doesn't directly affect the + kernel: saying N will just cause the configurator to skip all + the questions about Renesas devices. If you say Y, you will be asked + for your specific device in the following questions. + +if NET_VENDOR_ALACRITECH + +config SLICOSS + tristate "Alacritech Slicoss support" + depends on PCI + select CRC32 + ---help--- + This driver supports Gigabit Ethernet adapters based on the + Session Layer Interface (SLIC) technology by Alacritech. + + Supported are Mojave (1 port) and Oasis (1, 2 and 4 port) cards, + both copper and fiber. + + To compile this driver as a module, choose M here: the module + will be called slicoss. This is recommended. + +endif # NET_VENDOR_ALACRITECH diff --git a/drivers/net/ethernet/alacritech/Makefile b/drivers/net/ethernet/alacritech/Makefile new file mode 100644 index 000..8790e9e --- /dev/null +++ b/drivers/net/ethernet/alacritech/Makefile @@ -0,0 +1,4 @@ +# +# Makefile for the Alacritech Slicoss driver +# +obj-$(CONFIG_SLICOSS) += slicoss.o diff --git a/drivers/net/ethernet/alacritech/slic.h b/drivers/net/ethernet/alacritech/slic.h new file mode 100644 index 000..c62d46b --- /dev/null +++ b/drivers/net/ethernet/alacritech/slic.h @@ -0,0 +1,576 @@ + +#ifndef _SLIC_H +#define _SLIC_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#define SLIC_VGBSTAT_XPERR 0x4000 +#define SLIC_VGBSTAT_XERRSHFT 25 +#define SLIC_VGBSTAT_XCSERR0x23 +#define SLIC_VGBSTAT_XUFLOW0x22 +#define SLIC_VGBSTAT_XHLEN 0x20 +#define SLIC_VGBSTAT_NETERR0x0100 +#define SLIC_VGBSTAT_NERRSHFT 16 +#define SLIC_VGBSTAT_NERRMSK 0x1ff +#define SLIC_VGBSTAT_NCSERR0x103 +#define SLIC_VGBSTAT_NUFLOW0x102 +#define SLIC_VGBSTAT_NHLEN 0x100 +#define SLIC_VGBSTAT_LNKERR0x0080 +#define SLIC_VGBSTAT_LERRMSK 0xff +#define SLIC_VGBSTAT_LDEARLY 0x86 +#define SLIC_VGBSTAT_LBOFLO0x85 +#define SLIC_VGBSTAT_LCODERR 0x84 +#define SLIC_VGBSTAT_LDBLNBL 0x83 +#define SLIC_VGBSTAT_LCRCERR 0x82 +#define SLIC_VGBSTAT_LOFLO 0x81 +#define SLIC_VGBSTAT_LUFLO
Gigabit ethernet driver for Alacritechs SLIC devices (v3)
Hi, this is the third version of the slicoss gigabit ethernet driver (which is a rework of the driver from Alacritech which can currently be found under drivers/staging/slicoss). The driver is supposed to support Mojave, Oasis and Kalahari cards, for both copper and fiber. If this code is accepted the staging version can be removed. The driver has been tested on a SEN2104ET adapter (4 Port PCIe copper). v3: - dont add defines to pci.h but instead put it into the drivers header file (requested by Greg Kroah-Hartman) v2: - remove unusual padding in statistic strings (suggested by Andrew Lunn) - for mdio register and bit names use defines from mii.h instead of own ones (suggested by Andrew Lunn) - remove unused defines - ensure PCI flush at two more places - use mmiowb before lock to prevent mmio writes leaking out of lock - fix some typos in comments - add copyright and GPL header Regards, Lino ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: sm750fb: update license
On Sat, Nov 26, 2016 at 09:07:42AM +, Sudip Mukherjee wrote: > The driver was actually released with BSD license. It also gained GPL > when it was submitted to be included in the kernel. > > Cc: Teddy Wang> Cc: gzhou1 > Signed-off-by: Sudip Mukherjee > --- > drivers/staging/sm750fb/sm750.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c > index 2d22c51..e9632f1 100644 > --- a/drivers/staging/sm750fb/sm750.c > +++ b/drivers/staging/sm750fb/sm750.c > @@ -1243,4 +1243,4 @@ static void __exit lynxfb_exit(void) > MODULE_AUTHOR("monk liu "); > MODULE_AUTHOR("Sudip Mukherjee "); > MODULE_DESCRIPTION("Frame buffer driver for SM750 chipset"); > -MODULE_LICENSE("GPL v2"); > +MODULE_LICENSE("Dual BSD/GPL"); Should you also update the top of the files that don't say anything about licenses? I'll take this patch, but an update for them would also be good. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: gdm724x: Remove one blank line in sequence
Remove one blank line in sequence of two empty lines. Signed-off-by: Dawid Kurek--- drivers/staging/gdm724x/gdm_tty.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/gdm724x/gdm_tty.h b/drivers/staging/gdm724x/gdm_tty.h index 297438b..195c590 100644 --- a/drivers/staging/gdm724x/gdm_tty.h +++ b/drivers/staging/gdm724x/gdm_tty.h @@ -17,7 +17,6 @@ #include #include - #define TTY_MAX_COUNT 2 #define MAX_ISSUE_NUM 3 -- 2.10.0 --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: gdm724x: Align parameters to parenthesis
Align parameters to open parenthesis. Signed-off-by: Dawid Kurek--- drivers/staging/gdm724x/gdm_lte.h | 14 +++--- drivers/staging/gdm724x/netlink_k.h | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_lte.h b/drivers/staging/gdm724x/gdm_lte.h index 88414e5..7ddeabc 100644 --- a/drivers/staging/gdm724x/gdm_lte.h +++ b/drivers/staging/gdm724x/gdm_lte.h @@ -47,15 +47,15 @@ struct phy_dev { void*priv_dev; struct net_device *dev[MAX_NIC_TYPE]; int (*send_hci_func)(void *priv_dev, void *data, int len, - void (*cb)(void *cb_data), void *cb_data); +void (*cb)(void *cb_data), void *cb_data); int (*send_sdu_func)(void *priv_dev, void *data, int len, - unsigned int dftEpsId, unsigned int epsId, - void (*cb)(void *cb_data), void *cb_data, - int dev_idx, int nic_type); +unsigned int dftEpsId, unsigned int epsId, +void (*cb)(void *cb_data), void *cb_data, +int dev_idx, int nic_type); int (*rcv_func)(void *priv_dev, - int (*cb)(void *cb_data, void *data, int len, - int context), - void *cb_data, int context); + int (*cb)(void *cb_data, void *data, int len, + int context), + void *cb_data, int context); struct gdm_endian * (*get_endian)(void *priv_dev); }; diff --git a/drivers/staging/gdm724x/netlink_k.h b/drivers/staging/gdm724x/netlink_k.h index 7cf979b..5ebd731 100644 --- a/drivers/staging/gdm724x/netlink_k.h +++ b/drivers/staging/gdm724x/netlink_k.h @@ -18,7 +18,8 @@ #include struct sock *netlink_init(int unit, - void (*cb)(struct net_device *dev, u16 type, void *msg, int len)); + void (*cb)(struct net_device *dev, +u16 type, void *msg, int len)); int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len); #endif /* _NETLINK_K_H_ */ -- 2.10.0 --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[patch] staging: sm750fb: fix a type issue in sm750_set_chip_type()
"revId" needs to be unsigned because we use it to test: if (revId == SM750LE_REVISION_ID) { and SM750LE_REVISION_ID is ((unsigned char )0xfe). Fixes: 81dee67e215b ("staging: sm750fb: add sm750 to staging") Signed-off-by: Dan Carpenterdiff --git a/drivers/staging/sm750fb/ddk750_chip.h b/drivers/staging/sm750fb/ddk750_chip.h index e97e859..e63b8b2 100644 --- a/drivers/staging/sm750fb/ddk750_chip.h +++ b/drivers/staging/sm750fb/ddk750_chip.h @@ -87,7 +87,7 @@ struct initchip_param { }; logical_chip_type_t sm750_get_chip_type(void); -void sm750_set_chip_type(unsigned short devId, char revId); +void sm750_set_chip_type(unsigned short devId, u8 revId); unsigned int sm750_calc_pll_value(unsigned int request, struct pll_value *pll); unsigned int sm750_format_pll_reg(struct pll_value *pPLL); unsigned int ddk750_get_vm_size(void); diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c index 94f59f4..f59ce5c 100644 --- a/drivers/staging/sm750fb/ddk750_chip.c +++ b/drivers/staging/sm750fb/ddk750_chip.c @@ -14,7 +14,7 @@ logical_chip_type_t sm750_get_chip_type(void) return chip; } -void sm750_set_chip_type(unsigned short devId, char revId) +void sm750_set_chip_type(unsigned short devId, u8 revId) { if (devId == 0x718) chip = SM718; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: sm750fb: update license
The driver was actually released with BSD license. It also gained GPL when it was submitted to be included in the kernel. Cc: Teddy WangCc: gzhou1 Signed-off-by: Sudip Mukherjee --- drivers/staging/sm750fb/sm750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 2d22c51..e9632f1 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -1243,4 +1243,4 @@ static void __exit lynxfb_exit(void) MODULE_AUTHOR("monk liu "); MODULE_AUTHOR("Sudip Mukherjee "); MODULE_DESCRIPTION("Frame buffer driver for SM750 chipset"); -MODULE_LICENSE("GPL v2"); +MODULE_LICENSE("Dual BSD/GPL"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: gdm724x: Align parameters to parenthesis
On Fri, Nov 25, 2016 at 09:31:19PM +0100, Dawid Kurek wrote: > Align parameters to open parenthesis. Also remove one blank line in > sequence of two. That's multiple things in the same patch, please break it up into different patches (hint, if you say "Also" or "And" in a changelog comment, that's a huge flag that it needs to be split.) thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel