Re: [Qemu-devel] [PATCH for-2.5] eepro100: Prevent two endless loops

2015-11-24 Thread Jason Wang
On 11/20/2015 07:27 PM, P J P wrote: > +-- On Fri, 20 Nov 2015, Stefan Weil wrote --+ > | include/hw/pci/pci.h:static inline uint##_bits##_t > | ld##_l##_pci_dma(PCIDevice *dev, \ > >I see. > > | Is there an ideal count? If it is too low, it might break some use cases. > | If it is

Re: [Qemu-devel] [PATCH for-2.5] eepro100: Prevent two endless loops

2015-11-20 Thread P J P
+-- On Fri, 20 Nov 2015, Stefan Weil wrote --+ | include/hw/pci/pci.h:static inline uint##_bits##_t | ld##_l##_pci_dma(PCIDevice *dev, \ I see. | Is there an ideal count? If it is too low, it might break some use cases. | If it is too high, it will take longer until the loop is finis

Re: [Qemu-devel] [PATCH for-2.5] eepro100: Prevent two endless loops

2015-11-20 Thread Stefan Weil
Am 20.11.2015 um 09:39 schrieb P J P: > +-- On Fri, 20 Nov 2015, Stefan Weil wrote --+ > | diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c > | index 60333b7..685a478 100644 > | --- a/hw/net/eepro100.c > | +++ b/hw/net/eepro100.c > | @@ -774,6 +774,11 @@ static void tx_command(EEPRO100State *s) >

Re: [Qemu-devel] [PATCH for-2.5] eepro100: Prevent two endless loops

2015-11-20 Thread P J P
+-- On Fri, 20 Nov 2015, Stefan Weil wrote --+ | diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c | index 60333b7..685a478 100644 | --- a/hw/net/eepro100.c | +++ b/hw/net/eepro100.c | @@ -774,6 +774,11 @@ static void tx_command(EEPRO100State *s) | #if 0 | uint16_t tx_buffer_el = lduw_le

[Qemu-devel] [PATCH for-2.5] eepro100: Prevent two endless loops

2015-11-19 Thread Stefan Weil
http://lists.nongnu.org/archive/html/qemu-devel/2015-11/msg04592.html shows an example how an endless loop in function action_command can be achieved. During my code review, I noticed a 2nd case which can result in an endless loop. Reported-by: Qinghao Tang Signed-off-by: Stefan Weil --- hw/ne